mutation_reader: multishard_combining_reader: get rid of destructor
Now that the multishard_combining_reader is guaranteed to be called there is no longer need for stopping the shard readers in the destructor. Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -1829,8 +1829,6 @@ public:
|
||||
tracing::trace_state_ptr trace_state,
|
||||
mutation_reader::forwarding fwd_mr);
|
||||
|
||||
~multishard_combining_reader();
|
||||
|
||||
// this is captured.
|
||||
multishard_combining_reader(const multishard_combining_reader&) = delete;
|
||||
multishard_combining_reader& operator=(const multishard_combining_reader&) = delete;
|
||||
@@ -1939,12 +1937,6 @@ multishard_combining_reader::multishard_combining_reader(
|
||||
}
|
||||
}
|
||||
|
||||
multishard_combining_reader::~multishard_combining_reader() {
|
||||
for (auto& sr : _shard_readers) {
|
||||
sr->stop();
|
||||
}
|
||||
}
|
||||
|
||||
future<> multishard_combining_reader::fill_buffer(db::timeout_clock::time_point timeout) {
|
||||
_crossed_shards = false;
|
||||
return do_until([this] { return is_buffer_full() || is_end_of_stream(); }, [this, timeout] {
|
||||
@@ -1986,8 +1978,6 @@ future<> multishard_combining_reader::fast_forward_to(position_range pr, db::tim
|
||||
}
|
||||
|
||||
future<> multishard_combining_reader::close() noexcept {
|
||||
// Move _shard_readers to prevent double stop from
|
||||
// ~multishard_combining_reader.
|
||||
auto shard_readers = std::move(_shard_readers);
|
||||
return parallel_for_each(shard_readers, [] (lw_shared_ptr<shard_reader>& sr) {
|
||||
return sr->close();
|
||||
|
||||
Reference in New Issue
Block a user