large_data_handler: propagate a future out of stop()

stop() will close a semaphore in a followup patch, so it needs to return a
future.

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
This commit is contained in:
Rafael Ávila de Espíndola
2019-03-07 15:49:44 -08:00
parent 989ab33507
commit 54b856e5e4
3 changed files with 7 additions and 4 deletions

View File

@@ -1665,12 +1665,14 @@ future<> stop_database(sharded<database>& sdb) {
});
}).then([&sdb] {
return sdb.invoke_on_all([](database& db) {
db.stop_large_data_handler();
return db.stop_large_data_handler();
});
});
}
void database::stop_large_data_handler() { _large_data_handler->stop(); }
future<> database::stop_large_data_handler() {
return _large_data_handler->stop();
}
future<>
database::stop() {

View File

@@ -1373,7 +1373,7 @@ public:
future<> stop();
future<> close_tables(table_kind kind_to_close);
void stop_large_data_handler();
future<> stop_large_data_handler();
unsigned shard_of(const dht::token& t);
unsigned shard_of(const mutation& m);
unsigned shard_of(const frozen_mutation& m);

View File

@@ -53,9 +53,10 @@ public:
// Once large_data_handler is stopped it will ignore requests to update system.large_partitions. Any futures already
// returned must be waited for by the caller.
bool stopped() const { return _stopped; }
void stop() {
future<> stop() {
assert(!stopped());
_stopped = true;
return make_ready_future<>();
}
future<> maybe_record_large_rows(const sstables::sstable& sst, const sstables::key& partition_key,