Skip to content
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

sort ingesters when generating token lookup table fix #6513 #6535

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
improve readability
Signed-off-by: Daniel Sabsay <[email protected]>
  • Loading branch information
Daniel Sabsay committed Jan 23, 2025
commit 28860c75fe3f72ac465acf65b71a4c682579818f
10 changes: 5 additions & 5 deletions pkg/ring/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ func (d *Desc) Clone() interface{} {
func (d *Desc) getTokensInfo() map[uint32]instanceInfo {
out := map[uint32]instanceInfo{}

keys := []string{}
for key, _ := range d.Ingesters {
keys = append(keys, key)
instanceIDs := []string{}
for key := range d.Ingesters {
instanceIDs = append(instanceIDs, key)
}
sort.Strings(keys)
sort.Strings(instanceIDs)

for _, instanceID := range keys {
for _, instanceID := range instanceIDs {
instance := d.Ingesters[instanceID]
info := instanceInfo{
InstanceID: instanceID,
Expand Down
Loading