receive: make shuffle sharding stable on scale#8630
Merged
GiedriusS merged 3 commits intothanos-io:mainfrom Jan 26, 2026
Merged
receive: make shuffle sharding stable on scale#8630GiedriusS merged 3 commits intothanos-io:mainfrom
GiedriusS merged 3 commits intothanos-io:mainfrom
Conversation
Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
5f7de5d to
dab9ac4
Compare
GiedriusS
reviewed
Jan 22, 2026
pkg/receive/hashring.go
Outdated
| nodes := s.Nodes() | ||
| nodesByAZ := make(map[string][]Endpoint) | ||
| for _, node := range nodes { | ||
| nodeIndexByAddr := make(map[string]int) // map address to index in nodes slice |
Member
There was a problem hiding this comment.
This isn't used anywhere? What was the purpose of it before?
GiedriusS
reviewed
Jan 22, 2026
Member
GiedriusS
left a comment
There was a problem hiding this comment.
AFAICT it looks good - just some cosmetic suggestions. Thank you for your contribution 🙇
Contributor
Author
|
Pushed a commit to address code reviews. Thanks for taking a look. |
Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
0b5acaa to
e7b997f
Compare
Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
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.
Fixes shuffle sharding stability when scaling ingesters. Previously, adding or removing a single node could cause tenants to be reassigned to a completely different set of nodes. Now, at most 1 node changes per tenant when scaling. Added TestShuffleShardHashringStability to verify the consistency property.
Changes
Verification