From d7f5d6dba8eaeca53cdaaf904f736b5a50751a5c Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 8 Aug 2023 10:39:37 +0300 Subject: [PATCH] system_keyspace: Use system_keyspace's container() to flush In force_blocking_flush() there's an invoke-on-all invocation of replica::database::flush() and a FIXME to get the replica database from somewhere else rather than via query-processor -> data_dictionary. Since now the force_blocking_flush() is non-static the invoke-on-all can happen via system_keyspace's container and the database can be obtained directly from the sys.ks. local instance Signed-off-by: Pavel Emelyanov --- db/system_keyspace.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index 404c3e99f3..56c4671a9b 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -1722,9 +1722,9 @@ future<> system_keyspace::update_tokens(const std::unordered_set& to future<> system_keyspace::force_blocking_flush(sstring cfname) { assert(qctx); - return _qp.container().invoke_on_all([cfname = std::move(cfname)] (cql3::query_processor& qp) { + return container().invoke_on_all([cfname = std::move(cfname)] (db::system_keyspace& sys_ks) { // if (!Boolean.getBoolean("cassandra.unsafesystem")) - return qp.db().real_database().flush(NAME, cfname); // FIXME: get real database in another way + return sys_ks._db.flush(NAME, cfname); }); }