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

feat(engine): allow to override has_enough_parallelism #14608

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Feb 20, 2025

Towards #14376
Extracted from #14482

The current StateRootTask implementation requires the host to have a minimum number of threads to run properly and prevent eventual deadlocks. Currently StateRootTask is disabled if has_enough_parallelism returns true. For tests, we want StateRootTask to be enabled even on constrained environments, like CI, so that we can exercise the codepaths that use it.

Additionally, with the approach introduced in #14482 for engine unit tests StateRootTask results are mocked, and we are not spinning up any real thread, so running the tests on hosts with reduced parallelism should be ok.

These changes add a has_enough_parallelism field to TreeConfig, move the decision to use state root task to one of its methods and adds a setter to override the parallelism value read from the system, so that we can run tests with state root enabled if needed.

@fgimenez fgimenez added C-test A change that impacts how or what we test A-engine Related to the engine implementation labels Feb 20, 2025
@fgimenez fgimenez requested a review from shekhirin February 20, 2025 10:11
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, makes sense

@fgimenez fgimenez added this pull request to the merge queue Feb 21, 2025
Merged via the queue into main with commit 478f4e5 Feb 21, 2025
42 checks passed
@fgimenez fgimenez deleted the fgimenez/tree-config-has-enough-parallelism branch February 21, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-engine Related to the engine implementation C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants