mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user