Skip to content
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: increment txn.restarts.writetooold on WriteTooOld error #119411

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/kv/kvclient/kvcoord/txn_coord_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,13 @@ func (tc *TxnCoordSender) handleRetryableErrLocked(ctx context.Context, pErr *kv
}

case *kvpb.WriteTooOldError:
tc.metrics.RestartsWriteTooOld.Inc()
// Also increment the deprecated "txn.restarts.writetoooldmulti" metric.
// We preserve this for one release to avoid confusion in mixed-version
// clusters.
// TODO(nvanbenschoten): remove this when compatibility with v23.2 is no
// longer needed. At the same time, also remove the corresponding metric
// from the "Transaction Restarts" graph in the SQL Dashboard.
tc.metrics.RestartsWriteTooOldMulti.Inc()

case *kvpb.ReadWithinUncertaintyIntervalError:
Expand Down