Skip to content

Commit 5af1380

Browse files
committed
kvserver: allow ExclusionViolationError in SSI transactions
Get will return ExclusionViolationError instead of WriteTooOld errors. While we could check the IsoLevel before doing the transformation, I can't see a good reason not to return the ExclusionViolationError error. The ExclusionViolationError won't force a refresh, but that makes sense since the refresh will fail almost by definition. Epic: none Release note: None
1 parent 1b9e9be commit 5af1380

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pkg/kv/kvpb/data.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ func PrepareTransactionForRetry(
112112
return roachpb.Transaction{}, errors.AssertionFailedf(
113113
"unexpected intent missing error (%T); should be transformed into retry error", pErr.GetDetail())
114114
case *ExclusionViolationError:
115-
// With a fixed read snapshot, we should never see this error as WriteTooOld will take priority.
116-
if !txn.IsoLevel.PerStatementReadSnapshot() {
117-
return roachpb.Transaction{}, errors.AssertionFailedf(
118-
"unexpected exclusion violation error in %s transaction: %s should be transformed into retry error",
119-
txn.IsoLevel,
120-
pErr)
121-
}
122115
// An exclusion violation error always requires a restart.
123116
txn.WriteTimestamp.Forward(tErr.RetryTimestamp())
124117
errorAlwaysRequireRestart = true

0 commit comments

Comments
 (0)