db/system_distributed_keyspace: add all tables methods

Add methods to get the schema of all distributed and distribyted
everywhere tables respectively.
This commit is contained in:
Botond Dénes
2022-04-01 09:49:04 +03:00
parent be788140ff
commit 53b00ecefe
2 changed files with 11 additions and 0 deletions

View File

@@ -182,6 +182,14 @@ bool system_distributed_keyspace::is_extra_durable(const sstring& cf_name) {
return cf_name == CDC_TOPOLOGY_DESCRIPTION || cf_name == CDC_GENERATIONS_V2;
}
std::vector<schema_ptr> system_distributed_keyspace::all_distributed_tables() {
return {view_build_status(), cdc_desc(), cdc_timestamps(), service_levels()};
}
std::vector<schema_ptr> system_distributed_keyspace::all_everywhere_tables() {
return {cdc_generations_v2()};
}
system_distributed_keyspace::system_distributed_keyspace(cql3::query_processor& qp, service::migration_manager& mm, service::storage_proxy& sp)
: _qp(qp)
, _mm(mm)

View File

@@ -80,6 +80,9 @@ public:
* before being acknowledged? */
static bool is_extra_durable(const sstring& cf_name);
static std::vector<schema_ptr> all_distributed_tables();
static std::vector<schema_ptr> all_everywhere_tables();
system_distributed_keyspace(cql3::query_processor&, service::migration_manager&, service::storage_proxy&);
future<> start();