Commit 44f53e8
committed
kvnemesis: add CPut
This commit adds the following CPut operations to kvnemesis:
- `CPutMatchExisting`: the CPut condition matches an existing key's
value. Both the write and the preceding read are validated.
- `CPutMatchMissing`: the CPut condition matches a missing key's nil
value. This corresponds to the CPut generated by a typical `INSERT`
statement. Again both the write and the preceding read are
validated.
- `CPutNoMatch`: the CPut condition is not satisfied and the
request/batch/transaction fails. These errors are expected and
ignored by the test, but we still do some validation on the observed
values for the condition to fail.
- `CPutAllowIfDoesNotExist`: the CPut condition is not satisfied but the
operation succeeds if the value does not exist. The test is set up in
a way that the value most likely does not exist.
Fixes: #64810
Release note: None1 parent 3f6a4f4 commit 44f53e8
File tree
8 files changed
+242
-42
lines changed- pkg/kv/kvnemesis
8 files changed
+242
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
342 | 347 | | |
343 | 348 | | |
344 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
345 | 367 | | |
346 | 368 | | |
347 | 369 | | |
| |||
561 | 583 | | |
562 | 584 | | |
563 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
564 | 594 | | |
565 | 595 | | |
566 | 596 | | |
| |||
643 | 673 | | |
644 | 674 | | |
645 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
646 | 680 | | |
647 | 681 | | |
648 | 682 | | |
| |||
0 commit comments