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: declare write access to AbortSpan on all aborting EndTxn reqs #48245

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/kv/kvserver/batcheval/cmd_end_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ func declareKeysEndTxn(
header.Txn.AssertInitialized(context.TODO())
minTxnTS = header.Txn.MinTimestamp
abortSpanAccess := spanset.SpanReadOnly
if !et.Commit && et.Poison {
if !et.Commit {
// Rollback EndTxn requests may write to the abort span, either if
// their Poison flag is set, in which case they will add an abort
// span entry, or if their Poison flag is not set and an abort span
// entry already exists on this Range, in which case they will clear
// that entry.
abortSpanAccess = spanset.SpanReadWrite
}
latchSpans.AddNonMVCC(abortSpanAccess, roachpb.Span{
Expand Down