-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
kvcoord: Add metric to keep track of restarted ranges in rangefeed #98980
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
@@ -653,6 +653,7 @@ func (ds *DistSender) singleRangeFeed( | |||
// Ensure context is cancelled on all errors, to prevent gRPC stream leaks. | |||
ctx, cancelFeed := context.WithCancel(ctx) | |||
defer func() { | |||
ds.metrics.RangefeedRestartRanges.Inc(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.
This is going to increment the metric when the rangefeed isn't restarted too, e.g. when cancelled.
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.
Added check on ctx.Err.
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.
It will also increment the metric when handleRangefeedError
returns a permanent error. Shouldn't this be incremented in partialRangeFeed
once we've actually determined to restart the rangefeed?
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.
Yes, definitely
43abde5
to
7bc7b46
Compare
Add a `distsender.rangefeed.restart_ranges` metric to keep track of the number of ranges restarted due to transient error. Epic: CRDB-25044 Release note: None
bors r+ |
Build succeeded: |
Add a
distsender.rangefeed.restart_ranges
metric to keep track of the number of ranges restarted due to transient error.Epic: CRDB-25044
Release note: None