-
Notifications
You must be signed in to change notification settings - Fork 69
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
chore: Display token information in partition ring status page #631
Conversation
@@ -15,6 +15,8 @@ | |||
<th>State</th> | |||
<th>State updated at</th> | |||
<th>Owners</th> | |||
<th>Tokens</th> |
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.
Since we usually only show the Partition Ring page in ingest-storage mode, I chose not to add any extra toggle to show or hide these values. In contexts where these values don't make sense, the entire page is usually inaccessible.
@@ -94,6 +94,34 @@ func (m *PartitionRingDesc) partitionByToken() map[Token]int32 { | |||
return out | |||
} | |||
|
|||
// CountTokens returns the summed token distance of all tokens in each partition. | |||
func (m *PartitionRingDesc) countTokens() map[int32]int64 { |
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.
Chose this name for consistency with its corresponding operation on the instance ring:
Line 625 in 9935aca
func (r *Desc) CountTokens() map[string]int64 { |
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.
Nice work, thanks!
What this PR does:
The partition ring has a concept of tokens, but its tokens aren't visible in the partition ring status UI.
This PR ports the token-related affordances (count, ownership%, view all) from the ingester ring status page to the partition ring status page.
Screenshot of new columns:
When "Show Tokens" at the bottom is clicked:
Which issue(s) this PR fixes:
Contrib https://github.com/grafana/mimir-squad/issues/2350
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]