mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 22:43:15 +00:00
mvcc: Fix partition_snapshot::range_tombstones()
partition_snapshot::range_tombstones() is deoverlapping tombstones coming from different versions and it may happen that due to range tombstone splitting the method will return a tombstone which starts after the requested range. This would cause it to return a tombstone which doesn't overlap with the requested range. This breaks assumptions made by cache reader. It keeps track of the maximum fragment position, and if cache reader will then need to read from sstables due to a miss, it would do so starting from the position marked by that out of range tombstone, possibly skipping over some rows. Exposed by a change in row_cache_test.cc::test_mvcc() which fills the buffer of sm5 reader after it is created. Fixes #3053.
This commit is contained in:
@@ -572,7 +572,7 @@ partition_snapshot::range_tombstones(const ::schema& s, position_in_partition_vi
|
||||
list.apply(s, rt);
|
||||
}
|
||||
}
|
||||
return boost::copy_range<std::vector<range_tombstone>>(list);
|
||||
return boost::copy_range<std::vector<range_tombstone>>(list.slice(s, start, end));
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, partition_entry& e) {
|
||||
|
||||
Reference in New Issue
Block a user