-
Notifications
You must be signed in to change notification settings - Fork 719
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
pd-ctl: support topconfver and topversion #1233
Conversation
4ee554d
to
d10d053
Compare
pdctl/command/region_command.go
Outdated
|
||
topConfVer := &cobra.Command{ | ||
Use: "topconfver <limit>", | ||
Short: "show regions with top conf verion", |
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.
version
server/api/region_test.go
Outdated
mustRegionHeartbeat(c, s.svr, r3) | ||
s.checkTopFlow(c, fmt.Sprintf("%s/regions/writeflow", s.urlPrefix), []uint64{2, 1, 3}) | ||
s.checkTopFlow(c, fmt.Sprintf("%s/regions/readflow", s.urlPrefix), []uint64{1, 3, 2}) | ||
s.checkTopFlow(c, fmt.Sprintf("%s/regions/writeflow?limit=2", s.urlPrefix), []uint64{2, 1}) | ||
s.checkTopFlow(c, fmt.Sprintf("%s/regions/confver", s.urlPrefix), []uint64{3, 2, 1}) |
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 suppose you have to change checkTopFlow
to another name.
PTAL. @nolouch |
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.
LGTM
What problem does this PR solve?
Related to #1092.
What is changed and how it works?
This PR provides a way to list top regions whose conf version or version is the largest. After this PR, we can use
region topconfver <limit>
orregion topversion <limit>
inpd-ctl
to find what we want.Check List
Tests