Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
141121: kvserver: more logging in TestTxnReadWithinUncertaintyIntervalAfterLeaseTransfer r=tbg a=tbg

Log the observed timestamps as well. This is what it looks like (this was a passing run that I made fail on purpose, since the flake is hard to repro):

    client_replica_test.go:869: writeTs=1739273727.738545100,1, txn="test" meta={id=6fe77d84 key="b" iso=Serializable
    pri=0.03472329 epo=0 ts=1739273727.738545000,0 min=1739273727.738545000,0 seq=0} lock=true stat=PENDING
    rts=1739273727.738545000,0 wto=false gul=1739273728.238545000,0,
    obsTs=[{NodeID:2 Timestamp:1739273727.738545000,3}]

Note that here the observed timestamp equals the txn's timestamp, mod some logical ticks.  This isn't true in the failure case, where the (or at least an) observed timestamp seems to be 100+ns in the future.

Touches cockroachdb#141041.

Epic: none

Release note: None

Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
  • Loading branch information
craig[bot] and tbg committed Feb 12, 2025
2 parents 0070296 + 06bf12f commit 86580a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/client_replica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ func TestTxnReadWithinUncertaintyIntervalAfterLeaseTransfer(t *testing.T) {
assert.True(t, txn.ObservedTimestamps[0].Timestamp.ToTimestamp().Less(writeTs))

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

Expand Down

0 comments on commit 86580a9

Please sign in to comment.