-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
kvclient: fix rangefeed retry reason counters #133991
kvclient: fix rangefeed retry reason counters #133991
Conversation
This allows us to have a map of metrics in a struct. Epic: none Release note: None
Previously, retriable errors would often be recorded in the wrong retry counter because the code that initialised the metrics assumed a stable ordering when iterating a map. Given the amount of work that is about to happen when restarting a rangefeed, I doubt the optimization of a slice lookup vs a map lookup is that important here. Further, we almost surely do not want to panic just because we couldn't find a metric for the reason a node might have sent to us, so now rather than panic'ing we have a fallback counter for unknown error types. Epic: none Release note: Fix bug that could result in incorrect metrics related to retriable rangefeed errors.
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.
bors r+ |
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 d772ac5 to blathers/backport-release-23.2-133991: 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.2.x failed. See errors above. error creating merge commit from d772ac5 to blathers/backport-release-24.1-133991: 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 24.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Previously, retriable errors would often be recorded in the wrong
retry counter because the code that initialised the metrics assumed a
stable ordering when iterating a map.
Given the amount of work that is about to happen when restarting a
rangefeed, I doubt the optimization of a slice lookup vs a map lookup
is that important here.
Further, we almost surely do not want to panic just because we
couldn't find a metric for the reason a node might have sent to us, so
now rather than panic'ing we have a fallback counter for unknown error
types.
Epic: none
Release note: Fix bug that could result in incorrect metrics related
to retriable rangefeed errors.