Skip to content

Commit

Permalink
Merge #113887
Browse files Browse the repository at this point in the history
113887: kv/kvnemesis: disable replicated lock validation r=nvanbenschoten a=nvanbenschoten

Informs #111893, and others.

Deflakes kvnemesis, until #113768 is addressed.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
  • Loading branch information
craig[bot] and nvanbenschoten committed Nov 6, 2023
2 parents 70c8f60 + 7219a0b commit cb8192f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error {
/Table/100/"0000000000000001"/0.000000001,0 @ s1 v1
/Table/100/"0000000000000001"/0.000000002,0 @ s2 v2
/Table/100/"0000000000000003"/0.000000003,0 @ s3 v3
committed snapshot txn non-atomic timestamps: [r]/Table/100/"0000000000000001":[0.000000001,0, 0.000000002,0)->v1 [w]/Table/100/"0000000000000003":0.000000003,0->v3@s3
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error {
/Table/100/"0000000000000001"/0.000000002,0 @ s2 v2
/Table/100/"0000000000000002"/0.000000001,0 @ s3 v3
/Table/100/"0000000000000003"/0.000000003,0 @ s4 v4
committed snapshot txn non-atomic timestamps: [r]/Table/100/"0000000000000001":[0.000000001,0, 0.000000002,0)->v1 [r]/Table/100/"0000000000000002":[0.000000001,0, <max>)->v3 [w]/Table/100/"0000000000000003":0.000000003,0->v4@s4
25 changes: 14 additions & 11 deletions pkg/kv/kvnemesis/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ func (v *validator) processOp(op Operation) {
// consider the read as an observation if it found and returned a value,
// otherwise no lock would have been acquired on the non-existent key.
// Gets do not acquire gap locks.
observe = t.GuaranteedDurability && read.Value.IsPresent()
// TODO(nvanbenschoten): uncomment this once we have addressed #113768.
//observe = t.GuaranteedDurability && read.Value.IsPresent()
observe = false
default:
panic("unexpected")
}
Expand Down Expand Up @@ -721,16 +723,17 @@ func (v *validator) processOp(op Operation) {
// Furthermore, we only consider the individual keys that were returned to
// be locked, not the entire span that was scanned. Scans do not acquire
// gap locks.
if t.GuaranteedDurability {
for _, kv := range t.Result.Values {
read := &observedRead{
Key: kv.Key,
SkipLocked: t.SkipLocked,
Value: roachpb.Value{RawBytes: kv.Value},
}
v.curObservations = append(v.curObservations, read)
}
}
// TODO(nvanbenschoten): uncomment this once we have addressed #113768.
//if t.GuaranteedDurability {
// for _, kv := range t.Result.Values {
// read := &observedRead{
// Key: kv.Key,
// SkipLocked: t.SkipLocked,
// Value: roachpb.Value{RawBytes: kv.Value},
// }
// v.curObservations = append(v.curObservations, read)
// }
//}
default:
panic("unexpected")
}
Expand Down

0 comments on commit cb8192f

Please sign in to comment.