mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 19:10:42 +00:00
flat_reader_assertions::produces_range_tombstone() does not actually check range tombstones beyond the fact that they are in fact range tombstones (unless non-empty ck_ranges is passed). Fixing the immediate problem reveals that: * The assertion logic is not flexible enough to deal with creatively-split or creatively-overlapping range tombstones. * Some existing tests involving range tombstones are in fact wrong: some assertions may (at least with some readers) refer to wrong tombstones entirely, while others assert wrong things about right tombstones. * Range tombstones in pre-made sstables (such as those read by sstable_3_x_test) have deletion time drift, and that now has to be somehow dealt with. This patch (which is not split into smaller ones because that would either generate unreasonable amount of work towards ensuring bisectability or entail "temporarily" disabling problematic tests, which is cheating) contains the following changes: * flat_reader_assertions check range tombstones more carefully, by accumulating both expected and actually-read range tombstones into lists and comparing those lists when a partition ends (or when the assertion object is destroyed). * flat_reader_assertions::may_produce_tombstones() can take constraining ck_ranges. * Both flat_reader_assertions and flat_reader_assertions_v2 can be instructed to ignore tombstone deletion times, to help with tests that read pre-made sstables. * Affected tests are changed to reflect reality. Most changes to tests make sense; the only one I am not completely sure about is in test_uncompressed_filtering_and_forwarding_range_tombstones_read. Fixes #9470 Signed-off-by: Michael Livshin <michael.livshin@scylladb.com>