mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
Partitioned sstable set is not self sufficient, because it uses compatible_ring_position_view as key for interval map, which is constructed from a decorated key in sstable object. If sstable object is destroyed, like when compaction releases it early, partitioned set potentially no longer works because c__r__p__v would store information that is already freed, meaning its use implies use-after-free. Therefore, the problem happens when partitioned set tries to access the interval of its interval map and uses freed information from c__r__p__v. Fix is about using the newly introduced compatible_ring_position_or_view which can hold a ring_position, meaning that partitioned set is no longer dependent on lifetime of sstable object. Retire compatible_ring_position_view.hh as it is now unused. Fixes #4572. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Signed-off-by: Benny Halevy <bhalevy@scylladb.com>