Skip to content

Speedup Injector during concurrent node starts #118588

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 4 commits into from
Dec 12, 2024

Conversation

original-brownbear
Copy link
Member

Simple change to up test performance a little more that I found over the weekend when debugging tests and running the profiler for fun and profit :)
Let's simplify this logic a little to make it clear that we only have two cases for the scope at compile time and lock on the injector instance instead of the class by inlining the scoping logic.
Locking on the class actually wastes lots of time during test runs (O(10s) during x-pack as well as server internal cluster tests) it turns out (especially when running multi-cluster (CCR/CCS) tests, or starting many nodes).

Lets simplify this logic a little and lock on the injector instance
instead of the class. Locking on the class acutally wastes lots of time
during test runs it turns out, especially with multi-cluster tests.
@original-brownbear original-brownbear added >non-issue :Core/Infra/Node Lifecycle Node startup, bootstrapping, and shutdown labels Dec 12, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Dec 12, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear original-brownbear added auto-backport Automatically create backport pull requests when merged v8.18.0 labels Dec 12, 2024
@original-brownbear
Copy link
Member Author

Thanks Ryan!

@original-brownbear original-brownbear merged commit 0cc08a9 into elastic:main Dec 12, 2024
16 checks passed
@original-brownbear original-brownbear deleted the faster-inj branch December 12, 2024 21:39
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Dec 12, 2024
Lets simplify this logic a little and lock on the injector instance
instead of the class. Locking on the class actually wastes lots of time
during test runs it turns out, especially with multi-cluster tests.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Node Lifecycle Node startup, bootstrapping, and shutdown >non-issue Team:Core/Infra Meta label for core/infra team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants