Improving statsByShard performance when the number of shards is very large#130857
Merged
masseyke merged 44 commits intoelastic:mainfrom Nov 7, 2025
Merged
Improving statsByShard performance when the number of shards is very large#130857masseyke merged 44 commits intoelastic:mainfrom
masseyke merged 44 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @masseyke, I've created a changelog YAML for you. |
…asticsearch into fix/statsByShard-performance
Member
Author
|
This is related to #97222 |
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 7, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <joe.gallo@elastic.co>
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 7, 2025
…large (elastic#130857) Co-authored-by: Joe Gallo <joe.gallo@elastic.co> (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 <joe.gallo@elastic.co> (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 <joe.gallo@elastic.co>
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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