@@ -360,6 +360,7 @@ func checkDataNoNewEnemy(ctx context.Context, t testing.TB, slowNodeID int, crdb
360
360
Updates : []* v1.RelationshipUpdate {blockusers [i ]},
361
361
})
362
362
require .NoError (t , err )
363
+ t .Log ("r1 token: " , r1 .WrittenAt .Token )
363
364
364
365
// sleeping in between the writes seems to let cockroach clear out
365
366
// pending transactions in the background and has a better chance
@@ -373,6 +374,13 @@ func checkDataNoNewEnemy(ctx context.Context, t testing.TB, slowNodeID int, crdb
373
374
Updates : []* v1.RelationshipUpdate {allowlists [i ]},
374
375
})
375
376
require .NoError (t , err )
377
+ t .Log ("r2 token: " , r2 .WrittenAt .Token )
378
+
379
+ z1 , _ := zedtoken .DecodeRevision (r1 .WrittenAt , revisions.CommonDecoder {Kind : revisions .HybridLogicalClock })
380
+ z2 , _ := zedtoken .DecodeRevision (r2 .WrittenAt , revisions.CommonDecoder {Kind : revisions .HybridLogicalClock })
381
+
382
+ t .Log ("z1 revision: " , z1 )
383
+ t .Log ("z2 revision: " , z2 )
376
384
377
385
canHas , err := spicedb [1 ].Client ().V1 ().Permissions ().CheckPermission (context .Background (), & v1.CheckPermissionRequest {
378
386
Consistency : & v1.Consistency {Requirement : & v1.Consistency_AtExactSnapshot {AtExactSnapshot : r2 .WrittenAt }},
@@ -396,8 +404,6 @@ func checkDataNoNewEnemy(ctx context.Context, t testing.TB, slowNodeID int, crdb
396
404
ns2AllowlistLeader := getLeaderNodeForNamespace (ctx , crdb [2 ].Conn (), allowlists [i ].Relationship .Subject .Object .ObjectType )
397
405
398
406
r1leader , r2leader := getLeaderNode (ctx , crdb [2 ].Conn (), blockusers [i ].Relationship ), getLeaderNode (ctx , crdb [2 ].Conn (), allowlists [i ].Relationship )
399
- z1 , _ := zedtoken .DecodeRevision (r1 .WrittenAt , revisions.CommonDecoder {Kind : revisions .HybridLogicalClock })
400
- z2 , _ := zedtoken .DecodeRevision (r2 .WrittenAt , revisions.CommonDecoder {Kind : revisions .HybridLogicalClock })
401
407
t .Log (sleep , z1 , z2 , z1 .GreaterThan (z2 ), r1leader , r2leader , ns1BlocklistLeader , ns1UserLeader , ns2ResourceLeader , ns2AllowlistLeader )
402
408
403
409
if z1 .GreaterThan (z2 ) {
0 commit comments