-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Setting for estimated shard heap allocation decider #128722
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
elasticsearchmachine
merged 13 commits into
elastic:main
from
ywangd:ES-11445-cluster-info-stub
Jun 17, 2025
Merged
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c2ec8db
Stub a heap usage field on ClusterInfo
ywangd d3055ae
Merge remote-tracking branch 'origin/main' into ES-11445-cluster-info…
ywangd 3a358f2
update mock
ywangd f7e88c9
revert stub changes
ywangd 9ee5ce4
Merge remote-tracking branch 'origin/main' into ES-11445-cluster-info…
ywangd fea375f
add setting and update clusterInfoSimulator
ywangd d0593c8
ratio method
ywangd a3fb6db
fix compilation
ywangd f340579
fix tests
ywangd d3dd95a
extraction
ywangd 03375b6
Merge remote-tracking branch 'origin/main' into ES-11445-cluster-info…
ywangd 484523e
Merge remote-tracking branch 'origin/main' into ES-11445-cluster-info…
ywangd bd1801e
Merge remote-tracking branch 'origin/main' into ES-11445-cluster-info…
ywangd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This complexity looks a bit nasty, but I can't think of a way to make it nicer.
I wonder if it would look better if we made the decisions up front e.g.
probably wouldn't make much difference.
What about if we had something like...
You could argue its overkill now, but if we keep doing this stuff it'll make things easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the 2nd suggestion. At this point, it seems adding to the complexity, e.g. it still needs the three
if/elsestatements at the end. Maybe it can be better hidden ifFeaturesomehow handles the fetches internally. But that seems a bit too much for what we need here. So I pushed d3dd95a to extract eachif/elsebranch into its own method. This is somewhat aligned with your first suggestion. Though it does not reduce the complexity, I feel the readability is better since it seems clearer about when a particular stats need to be fetched. Please let me know if that works for you. Thanks!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that improves the readability, thanks.