mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +00:00
So far, the only way to combine outputs of multiple readers was to use combining reader. It is very general and, in particular, supports case when the readers emit mutations from overlapping ranges. However, we have cases (e.g. streaming) when we need to read from several disjoint ranges. Combining reader is a suboptimal solution as it requires to creating a reader for each range and ignores the fact that they do not overlap. This patch introduces multi_range_mutation_reader which takes a mutation_source and a sorted set of disjoint ranges. Internally, it uses mutation_reader::fast_forward_to() to move to the next range once the current one is completed.
12 KiB
12 KiB