mutation_writer: update bucket/shard writers consume_end_of_stream

After 61520a33d6
feed_writers doesn't call consume_end_of_stream
after abort() so no need to test
            if (!_handle.is_terminated()) {

and consume_end_of_stream is now called in then_wrapped
rather than `finally` so it's ok if it throws.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2021-01-19 18:44:40 +02:00
parent faf71c6f75
commit a9d91a2d09
2 changed files with 2 additions and 10 deletions

View File

@@ -48,13 +48,7 @@ class shard_based_splitting_mutation_writer {
return _handle.push(std::move(mf));
}
future<> consume_end_of_stream() {
// consume_end_of_stream is always called from a finally block,
// and that's because we wait for _consume_fut to return. We
// don't want to generate another exception here if the read was
// aborted.
if (!_handle.is_terminated()) {
_handle.push_end_of_stream();
}
_handle.push_end_of_stream();
return std::move(_consume_fut);
}
void abort(std::exception_ptr ep) {

View File

@@ -139,9 +139,7 @@ class timestamp_based_splitting_mutation_writer {
return _handle.push(std::move(mf));
}
future<> consume_end_of_stream() {
if (!_handle.is_terminated()) {
_handle.push_end_of_stream();
}
_handle.push_end_of_stream();
return std::move(_consume_fut);
}
void abort(std::exception_ptr ep) {