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:
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user