Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Thread count increased after usage of ScheduledDataLoaderRegistry #173

Copy link
Copy link
@Ruch12

Description

@Ruch12
Issue body actions

Describe the bug
We've merged the latest version after validating the fix was deployed - #135 yet the thread count has started to increase significantly. The threads aren't getting closed after the completion of the task unlike DataLoaderRegistry.

We've initialized ScheduledDataLoaderRegistry in the following way in the ServiceContextImpl -

    public ScheduledDataLoaderRegistry getScheduledDataLoaderRegistry() {

        if (null == scheduledDataLoaderRegistry) {
            DispatchPredicate dispatchPredicate = DispatchPredicate.dispatchIfLongerThan(Duration.ofMillis(50));
            scheduledDataLoaderRegistry = ScheduledDataLoaderRegistry.newScheduledRegistry()
                    .registerAll(dataLoaderRegistry)
                    .dispatchPredicate(dispatchPredicate)
                    .build();
        }

        return scheduledDataLoaderRegistry;
    }

The issue is that the threads are not getting closed after the execution of the scheduledDataLoaderRegistry and when the response is ready and sent back.

In this case, shouldn't the logic be handled in a way when there is nothing to be dispatched and all data loaders have completed their work, we should close the thread?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.