-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ES-10037 Configurable metrics in data stream auto-sharding #125612
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
PeteGillinElastic
merged 6 commits into
elastic:main
from
PeteGillinElastic:ES-10037-allow-recent-write-load-in-autosharding
Mar 28, 2025
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a35f531
Refactor `DataStreamAutoShardingServiceTests`
PeteGillinElastic fe87746
Configurable metrics in data stream auto-sharding
PeteGillinElastic 7dc015d
[CI] Auto commit changes from spotless
422f44f
Respond to review comment: Make DSASS.calculate() take the stats obje…
PeteGillinElastic f019344
Update server/src/main/java/org/elasticsearch/action/datastreams/auto…
PeteGillinElastic b22ec78
Merge remote-tracking branch 'upstream/main' into ES-10037-allow-rece…
PeteGillinElastic 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
Oops, something went wrong.
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.
Thinking out loud: what if we moved the write load calculations in the
dataStreamAutoShardingService.calculate(...)and just pass theindexStats?I think it fits the responsibility of the
DataStreamAutoShardingService.javabetter and it can potentially allow us to do further improvements, if we deem that some write loads are not relevant.What do you think?
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's a good suggestion. I've pushed a commit to do this, see what you think.
I agree that it's better separation of responsibilities. It makes the tests a bit more complicated, because of all the stuff we have to construct to extract and sum those three values from. However it also increases test coverage, I think, because we didn't previously test the extraction and summation logic AFAICS (the tests for the rollover action never asserted that it was making the correct call to the auto-sharding service) and now we do. So the additional complication is in a good cause!