-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improving statsByShard performance when the number of shards is very large #130857
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
Hi @masseyke, I've created a changelog YAML for you. |
…asticsearch into fix/statsByShard-performance
Member
Author
|
This is related to #97222 |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 7, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <[email protected]>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 7, 2025
…large (#130857) (#137749) Co-authored-by: Joe Gallo <[email protected]>
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 7, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <[email protected]> (cherry picked from commit 22c15bc)
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 7, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <[email protected]> (cherry picked from commit 22c15bc) # Conflicts: # server/src/test/java/org/elasticsearch/indices/IndicesQueryCacheTests.java
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 7, 2025
…large (#130857) (#137766) (cherry picked from commit 22c15bc) Co-authored-by: Joe Gallo <[email protected]>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 7, 2025
…large (#130857) (#137768) Co-authored-by: Joe Gallo <[email protected]> (cherry picked from commit 22c15bc) # Conflicts: # server/src/test/java/org/elasticsearch/indices/IndicesQueryCacheTests.java
Kubik42
pushed a commit
to Kubik42/elasticsearch
that referenced
this pull request
Nov 10, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <[email protected]>
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 12, 2025
…is very large (elastic#130857)" This reverts commit 22c15bc.
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 12, 2025
…is very large (elastic#130857)" (elastic#137973) This reverts commit 22c15bc.
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 12, 2025
…is very large (elastic#130857)" (elastic#137973) This reverts commit 22c15bc.
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 12, 2025
…is very large (elastic#130857)" (elastic#137973) This reverts commit 22c15bc.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 12, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 12, 2025
masseyke
added a commit
that referenced
this pull request
Nov 12, 2025
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 12, 2025
…is very large (elastic#130857)" (elastic#137973) This reverts commit 22c15bc. (cherry picked from commit e138f5f) # Conflicts: # server/src/test/java/org/elasticsearch/indices/IndicesQueryCacheTests.java
masseyke
added a commit
that referenced
this pull request
Nov 13, 2025
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 14, 2025
… is very large (elastic#130857)" (elastic#137973) (elastic#137984) This reverts commit 391de08.
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 14, 2025
… is very large (elastic#130857)" (elastic#137973) (elastic#137984) This reverts commit 391de08.
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
backport pending
>bug
:Data Management/Stats
Statistics tracking and retrieval APIs
Team:Data Management
Meta label for data/management team
v8.19.8
v9.1.8
v9.2.2
v9.3.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes IndicesService.statsByShard() so that it no longer has O(N^2) performance (where N is the number of shards in the cache). It does this by pre-computing the total number of objects in the cache and the total number of shards represented in the cache, so that these don't have to be calculated for each shard.
Closes #97222