mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 18:50:53 +00:00
We know that sstable_run is supposed to contain disjoint files only, but this assumption can temporarily break when switching strategies as TWCS, for example, can incorrectly pick the same run id for sstables in different windows during segregation. So when switching from TWCS to ICS, it could happen a sstable_run won't contain disjoint files. We should definitely fix TWCS and any other strategy doing that, but sstable_run should have disjointness as actual invariant, not be relaxed on it. Otherwise, we cannot build readers on this assumption, so more complicated logic have to be added to merge overlapping files. After this patch, sstable_run will reject insertion of a file that will cause the invariant to break, so caller will have to check that and push that file into a different sstable run. Closes #11116