Skip to content

Commit 707f708

Browse files
authored
Merge pull request #150962 from rafiss/blathers/backport-release-25.3-150178
release-25.3: kvpb: avoid over redaction of prev_err field
2 parents cc0eb4f + b2d494c commit 707f708

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/kv/kvclient/kvcoord/txn_coord_sender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ func (tc *TxnCoordSender) updateStateLocked(
10401040
if kvpb.ErrPriority(pErr.GoError()) != kvpb.ErrorScoreUnambiguousError {
10411041
tc.mu.txnState = txnError
10421042
tc.mu.storedErr = kvpb.NewError(&kvpb.TxnAlreadyEncounteredErrorError{
1043-
PrevError: pErr.String(),
1043+
PrevError: redact.Sprintf("%v", pErr),
10441044
})
10451045
}
10461046

pkg/kv/kvpb/errors.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ message TransactionRetryWithProtoRefreshError {
573573
message TxnAlreadyEncounteredErrorError{
574574
// prev_error is the message from the error that the txn encountered
575575
// previously.
576-
optional string prev_error = 1 [(gogoproto.nullable) = false];
576+
optional string prev_error = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cockroachdb/redact.RedactableString"];
577577
}
578578

579579
// An IntegerOverflowError indicates that an operation was aborted because

0 commit comments

Comments
 (0)