Skip to content

improve: caching executor for startup tasks and remove parallel() #1755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 6, 2023

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Feb 3, 2023

Using CachedThreadPool for startup tasks, this includes the controller and event source. And removing parallel() usage, that likely caused the rare deadlock in some operators.

CachedThreadPool is ideal for such tasks, since it reuses and dynamically adjusts thread count. What we need is a separate thread on startup for each informer / event source. Also those threads are later autoamitcally removed, when not used anymore.

@csviri csviri self-assigned this Feb 3, 2023
@csviri csviri requested a review from metacosm February 3, 2023 15:32
@csviri csviri linked an issue Feb 3, 2023 that may be closed by this pull request
@csviri csviri changed the title improve: caching executor for startup tasks improve: caching executor for startup tasks and remove parallel() Feb 3, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

48.5% 48.5% Coverage
0.0% 0.0% Duplication

@csviri csviri merged commit d3b317a into main Feb 6, 2023
@csviri csviri deleted the caching-executor branch February 6, 2023 14:29
@csviri csviri linked an issue Feb 9, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve thread count handling for Informer Start Operator doesn't start when watching multiple namespaces
2 participants