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

release-24.2: kvserver: log txn and write ts in a test #131072

Merged
merged 1 commit into from
Sep 23, 2024
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
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 @@ -863,9 +863,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