mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
compaction: Make sure a partition is filtered out only by producer
If interposer consumer is enabled, partition filtering will be done by the consumer instead, but that's not possible because only the producer is able to skip to the next partition if the current one is filtered out, so scylla crashes when that happens with a bad function call in queue_reader. This is a regression which started here:55a8b6e3c9To fix this problem, let's make sure that partition filtering will only happen on the producer side. Fixes #7590. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Message-Id: <20201111221513.312283-1-raphaelsc@scylladb.com> (cherry picked from commit13fa2bec4c)
This commit is contained in:
committed by
Avi Kivity
parent
da29b65e04
commit
9c7ff01c5d
@@ -609,10 +609,12 @@ private:
|
||||
std::move(gc_consumer));
|
||||
|
||||
return seastar::async([cfc = std::move(cfc), reader = std::move(reader), this] () mutable {
|
||||
reader.consume_in_thread(std::move(cfc), make_partition_filter(), db::no_timeout);
|
||||
reader.consume_in_thread(std::move(cfc), db::no_timeout);
|
||||
});
|
||||
});
|
||||
return consumer(make_sstable_reader());
|
||||
// producer will filter out a partition before it reaches the consumer(s)
|
||||
auto producer = make_filtering_reader(make_sstable_reader(), make_partition_filter());
|
||||
return consumer(std::move(producer));
|
||||
}
|
||||
|
||||
virtual reader_consumer make_interposer_consumer(reader_consumer end_consumer) {
|
||||
|
||||
Reference in New Issue
Block a user