Files
scylladb/sstables
Tomasz Grabiec ef6edff673 sstables: mc: reader: Move out-of-range check out of push_ready_fragments()
Currently, calling push_ready_fragments() with _mf_filter disengaged
or with _mf_filter->out_of_range() causes it to call
_reader->on_out_of_clustering_range(), which emits the partition_end
fragment. It's incorrect to emit this fragment twice, or zero times,
so correctness depends on the fact that push_ready_fragments() is
called exactly once when transitioning between partitions.

This is proved to be tricky to ensure, especially after partition_end
starts to be emitted in a different path as well. Ensuring that
push_ready_fragments() is *NOT* called after partition_end is emitted
from consume_partition_end() becomes tricky.

After having to fix this problem many times after unrelated changes to
the flow, I decide that it's better to refactor.

This change moves the call of on_out_of_clustering_range() out of
push_ready_fragments(), making the latter safe to call any number of
times.

The _mf_filter->out_of_range() check is moved to sites which update
the filter.

It's also good because it gets rid of conditionals.
2019-06-19 14:29:01 +02:00
..
2018-11-21 00:01:44 +02:00
2018-11-21 00:01:44 +02:00
2019-01-22 15:34:32 +02:00
2019-04-12 09:33:40 +02:00