Skip to content

Commit

Permalink
rangefeed: assert intent commits above resolved timestamp
Browse files Browse the repository at this point in the history
Epic: none
Release note: None
  • Loading branch information
erikgrinaker committed Jan 11, 2024
1 parent 0039f97 commit e7ac988
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/kv/kvserver/rangefeed/resolved_timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ func (rts *resolvedTimestamp) consumeLogicalOp(op enginepb.MVCCLogicalOp) bool {
return rts.intentQ.UpdateTS(t.TxnID, t.Timestamp)

case *enginepb.MVCCCommitIntentOp:
// NB: this assertion can be violated in mixed-version clusters, we choose
// to trip the assertion rather than violate checkpoint guarantees.
// See: https://github.com/cockroachdb/cockroach/issues/104309
//
// TODO(erikgrinaker): check that this won't end up with crash loops.
rts.assertOpAboveRTS(op, t.Timestamp)
return rts.intentQ.DecrRef(t.TxnID, t.Timestamp)

case *enginepb.MVCCAbortIntentOp:
Expand Down

0 comments on commit e7ac988

Please sign in to comment.