diff --git a/service/raft/group0_state_machine.cc b/service/raft/group0_state_machine.cc index edb6b09f8a..d61d101a94 100644 --- a/service/raft/group0_state_machine.cc +++ b/service/raft/group0_state_machine.cc @@ -99,7 +99,7 @@ static future<> mutate_locally(utils::chunked_vector muts, s }); } -static bool should_flush_system_topology_after_applying(const mutation& mut, const data_dictionary::database db) { +bool should_flush_system_topology_after_applying(const mutation& mut, const data_dictionary::database db) { if (!db.has_schema(db::system_keyspace::NAME, db::system_keyspace::TOPOLOGY)) { return false; } @@ -120,7 +120,7 @@ static bool should_flush_system_topology_after_applying(const mutation& mut, con return false; } -static future<> write_mutations_to_database(storage_proxy& proxy, gms::inet_address from, std::vector cms) { +future<> write_mutations_to_database(storage_proxy& proxy, gms::inet_address from, std::vector cms) { std::vector mutations; mutations.reserve(cms.size()); bool need_system_topology_flush = false; diff --git a/service/raft/group0_state_machine.hh b/service/raft/group0_state_machine.hh index 976753af90..17e91c951a 100644 --- a/service/raft/group0_state_machine.hh +++ b/service/raft/group0_state_machine.hh @@ -10,6 +10,7 @@ #include #include +#include "data_dictionary/data_dictionary.hh" #include "service/broadcast_tables/experimental/lang.hh" #include "raft/raft.hh" #include "service/raft/group0_state_id_handler.hh" @@ -122,4 +123,9 @@ public: future<> abort() override; }; +bool should_flush_system_topology_after_applying(const mutation& mut, const data_dictionary::database db); + +// Used to write data to topology and other tables except schema tables. +future<> write_mutations_to_database(storage_proxy& proxy, gms::inet_address from, std::vector cms); + } // end of namespace service