Skip to content

Commit

Permalink
kv: add TODO for savepoint seqNum exclusivity
Browse files Browse the repository at this point in the history
Informs cockroachdb#94731.

This probably isn't working correctly. Make a note of it in the code.

Release note: None
  • Loading branch information
nvanbenschoten committed Mar 25, 2024
1 parent 2bd61ba commit b1224b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/kv/kvclient/kvcoord/txn_coord_sender_savepoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ type savepoint struct {
// seqNum represents the write seq num at the time the savepoint was created.
// On rollback, it configures the txn to ignore all seqnums from this value
// until the most recent seqnum.
// TODO(nvanbenschoten): this field is currently defined to be an exclusive
// lower bound, with the assumption that any writes performed after the
// savepoint is established will use a higher sequence number. This probably
// isn't working correctly with shared and exclusive lock acquisition, which
// don't increment the writeSeq. We should increment the writeSeq when a
// savepoint is established and then consider this an inclusive lower bound.
seqNum enginepb.TxnSeq

// txnSpanRefresher fields.
Expand Down

0 comments on commit b1224b9

Please sign in to comment.