diff --git a/pkg/kv/kvclient/kvcoord/txn_coord_sender.go b/pkg/kv/kvclient/kvcoord/txn_coord_sender.go index 1797935d6dd6..3956bbff5d22 100644 --- a/pkg/kv/kvclient/kvcoord/txn_coord_sender.go +++ b/pkg/kv/kvclient/kvcoord/txn_coord_sender.go @@ -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: