view_update_generator: start: close staging_sstable_reader when done

The staging_sstable_reader has to be closed before it's destroyed.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2021-02-11 10:47:10 +02:00
parent 1e1c8ea824
commit 02d74e1530

View File

@@ -96,6 +96,7 @@ future<> view_update_generator::start() {
inject_failure("view_update_generator_consume_staging_sstable");
auto result = staging_sstable_reader.consume_in_thread(view_updating_consumer(s, std::move(permit), *t, sstables, _as, staging_sstable_reader_handle), db::no_timeout);
staging_sstable_reader.close().get();
if (result == stop_iteration::yes) {
break;
}