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

Ring status page: fix the owned tokens percentage value displayed #282

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

pracucci
Copy link
Contributor

What this PR does:
I'm unbalanced series between Mimir ingesters. While investigating, I noticed the owned tokens percentage displayed in the ring status page is wrong. This PR fixed it and also expose ring.Desc.CountTokens() so that I can re-use it in a ring analysis tool I'm building (instead of copying the code).

What's the bug in countTokens() and why this PR fixes it? The tokens in the ring are the end of the range, while countTokens() was computing the owned tokens range as if the token is the start of the range.

Which issue(s) this PR fixes:

N/A

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very subtle. LGTM, thanks!

Copy link
Contributor

@treid314 treid314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Catch!

@treid314 treid314 merged commit dcfeb21 into main Apr 13, 2023
@treid314 treid314 deleted the fix-ring-count-tokens branch April 13, 2023 14:00
Copy link
Contributor

@duricanikolic duricanikolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants