Skip to content

Commit

Permalink
Merge #98082
Browse files Browse the repository at this point in the history
98082: spanconfig: deflake spanconfigreconcilerccl/TestDataDriven r=irfansharif a=irfansharif

Fixes #98038. This test set up two protection records over two schema objects at two timestamps ts=3 and ts=4.
```
   /Table/10{6-7}  protection_policies=[{ts: 3} {ts: 4}]
   /Table/10{7-8}  protection_policies=[{ts: 3} {ts: 4}]
```
When it later released those protection records:
```
   release record-id=3
   release record-id=4
   ----
```
It asserted that the span config mutations showed that we did infact get rid of the protected state:
```
   mutations
   ----
   delete /Table/10{6-7}
   upsert /Table/10{6-7}      range default
   delete /Table/10{7-8}
   upsert /Table/10{7-8}      range default
```
But since release of these protections was non-atomic, in #98038 we observed the following transition instead.
```
   delete /Table/10{6-7}
   upsert /Table/10{6-7}      protection_policies=[{ts: 4}]
   delete /Table/10{7-8}
   upsert /Table/10{7-8}      protection_policies=[{ts: 4}]
   delete /Table/10{6-7}
   upsert /Table/10{6-7}      range default
   delete /Table/10{7-8}
   upsert /Table/10{7-8}      range default
```
That is, we first got rid of the record with ts=3 and only then got rid of ts=4. We just rewrite the test to assert on the final state of the records that show no remaining protections, instead of trying to add synchronization for mutations.

Release note: None

Co-authored-by: irfan sharif <[email protected]>
  • Loading branch information
craig[bot] and irfansharif committed Mar 6, 2023
2 parents f2536f8 + 0aee3d8 commit 2853470
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,23 @@ state limit=2
/System/NodeLiveness{-Max} ttl_seconds=600 num_replicas=5
...

# Take another look at the remaining protected spans.
state offset=57
----
...
/Table/10{6-7} protection_policies=[{ts: 3} {ts: 4}]
/Table/10{7-8} protection_policies=[{ts: 3} {ts: 4}]

# Release the schema object records.
release record-id=3
----

release record-id=4
----

mutations
# Observe that they're no longer protected.
state offset=57
----
delete /Table/10{6-7}
upsert /Table/10{6-7} range default
delete /Table/10{7-8}
upsert /Table/10{7-8} range default
...
/Table/10{6-7} range default
/Table/10{7-8} range default

0 comments on commit 2853470

Please sign in to comment.