Skip to content
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

Fix Fate pool watcher bug #5171

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

kevinrr888
Copy link
Member

@kevinrr888 kevinrr888 commented Dec 12, 2024

Was incorrectly calculating the number of TransactionRunners to execute.
getQueue().size() is the number of tasks that have been submitted to the pool that currently don't have a thread available to work on them. This should instead be the number of tasks that are currently running. Before this was submitting new TransactionRunners unnecessarily
Noticed when working on #5130

Was incorrectly calculating the number of TransactionRunners to execute
@kevinrr888 kevinrr888 added this to the 2.1.4 milestone Dec 12, 2024
@kevinrr888 kevinrr888 self-assigned this Dec 12, 2024
Copy link
Contributor

@cshannon cshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm not sure how doable it is but looking at this I'm wondering if it would be possible to write a test that verifies the correct number of transaction runners are started if the pool is resized. That could always be done as a follow on or maybe just added as part of #5130 as that will be refactoring all the thread pool stuff anyways

@kevinrr888
Copy link
Member Author

kevinrr888 commented Dec 13, 2024

LGTM, I'm not sure how doable it is but looking at this I'm wondering if it would be possible to write a test that verifies the correct number of transaction runners are started if the pool is resized. That could always be done as a follow on or maybe just added as part of #5130 as that will be refactoring all the thread pool stuff anyways

Yeah, I considered that as well. I think it would be a doable test. I think most likely I'll be adding tests for all the changes for #5130 anyways so would probably be easiest to include with those changes (would have the downside of only testing in 4.0+ though). Or, could just add the test here or as a follow on later like you mentioned

@kevinrr888
Copy link
Member Author

I'll just merge this now since I am already merging something else from 2.1 through main. I'll make myself a note about the test

@kevinrr888 kevinrr888 merged commit 79d972f into apache:2.1 Dec 16, 2024
8 checks passed
@kevinrr888 kevinrr888 deleted the fate-pool-watcher-fix branch December 16, 2024 15:39
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.

3 participants