-
Notifications
You must be signed in to change notification settings - Fork 439
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
storcon: improve initial shard scheduling #9081
Merged
Merged
Conversation
This file contains 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
Different scheduling heuristics shall be applied depending on whether the shard is attached or secondary.
We wish to apply different scheduling heuristics based on whether the shard is an attached shard or a secondary shard. This commit achieves that by having separate score types for the two cases. For attached shards, it also includes the count of attached shards for the current tenant from the scheduling context. This brings initial shard scheduling in line with the scheduling done during optimizations.
VladLazar
commented
Sep 20, 2024
5133 tests run: 4969 passed, 0 failed, 164 skipped (full report)Flaky tests (5)Postgres 17
Postgres 16
Postgres 14
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
7825755 at 2024-09-24T09:14:55.289Z :recycle: |
jcsp
reviewed
Sep 23, 2024
jcsp
approved these changes
Sep 23, 2024
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 like how this is expressed with types. Use of member order for the contributions to score is much more readable than my original .0, .1, .2 line of code.
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.
Problem
Scheduling on tenant creation uses different heuristics compared to the scheduling done during
background optimizations. This results in scenarios where shards are created and then immediately
migrated by the optimizer.
Summary of changes
We wish to have different heuristics.
calculation. This brings initial shard scheduling in line with what the optimization passes do.
This looks like a bigger change than required, but the refactoring serves as the basis for az-aware
shard scheduling where we also need to make the distinction between attached and secondary shards.
Closes #8969
Checklist before requesting a review
Checklist before merging