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
kv: add raft.commands.pending
metric
#123264
kv: add raft.commands.pending
metric
#123264
Conversation
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.
Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @miraradeva)
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.
Is it true that RaftCommandsProposed = RaftCommandsPending + RaftCommandsReproposed + RaftCommandsReproposedLAI
?
Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @nvanbenschoten)
pkg/kv/kvserver/replica_metrics.go
line 56 at r1 (raw file):
BehindCount int64 PausedFollowerCount int64 RaftProposalCount int64
It's a little confusing that there is another metric here called RaftCommandsProposed
. Should this one be RaftCommandsPending
for consistency?
Fixes cockroachdb#123259. This commit adds a new metric called `raft.commands.pending`. This metric tracks the number of Raft commands that the leaseholders on a node are tracking as in-flight. These commands will be periodically reproposed until they are applied or until they fail, either unequivocally or ambiguously. Release note: None
60ec815
to
a687bb1
Compare
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.
TFTRs!
bors r=kvoli,miraradeva
Is it true that
RaftCommandsProposed = RaftCommandsPending + RaftCommandsReproposed + RaftCommandsReproposedLAI
?
Not quite. The other three are counters, not gauges, so they'll continue to tick up even as RaftCommandsPending
bounces off of 0.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @kvoli and @miraradeva)
pkg/kv/kvserver/replica_metrics.go
line 56 at r1 (raw file):
Previously, miraradeva (Mira Radeva) wrote…
It's a little confusing that there is another metric here called
RaftCommandsProposed
. Should this one beRaftCommandsPending
for consistency?
Good point, done.
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a687bb1 to blathers/backport-release-23.1-123264: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Fixes #123259.
This commit adds a new metric called
raft.commands.pending
. This metric tracks the number of Raft commands that the leaseholders on a node are tracking as in-flight. These commands will be periodically reproposed until they are applied or until they fail, either unequivocally or ambiguously.Demonstration that this is hooked up properly while running
cockroach workload run kv --init --concurrency=512
:Release note: None