Skip to content

Commit

Permalink
Merge pull request #131073 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-24.1-130802

release-24.1: kvserver: log txn and write ts in a test
  • Loading branch information
tbg authored Sep 23, 2024
2 parents 619993c + 91575d6 commit 9e724c0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/kv/kvserver/client_replica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,14 @@ func TestTxnReadWithinUncertaintyIntervalAfterLeaseTransfer(t *testing.T) {
// The transaction has a read timestamp beneath the write's commit timestamp
// but a global uncertainty limit above the write's commit timestamp. The
// observed timestamp collected is also beneath the write's commit timestamp.
require.True(t, txn.ReadTimestamp.Less(writeTs))
require.True(t, writeTs.Less(txn.GlobalUncertaintyLimit))
require.True(t, txn.ObservedTimestamps[0].Timestamp.ToTimestamp().Less(writeTs))
assert.True(t, txn.ReadTimestamp.Less(writeTs))
assert.True(t, writeTs.Less(txn.GlobalUncertaintyLimit))
assert.True(t, txn.ObservedTimestamps[0].Timestamp.ToTimestamp().Less(writeTs))

if t.Failed() {
t.Logf("writeTs=%s, txn=%+v", writeTs, txn)
t.FailNow()
}

// Add a replica for key A's range to node 2. Transfer the lease.
tc.AddVotersOrFatal(t, keyA, tc.Target(1))
Expand Down

0 comments on commit 9e724c0

Please sign in to comment.