Skip to content

Commit

Permalink
raft: use schema commitlog for raft tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Gusev committed Mar 21, 2023
1 parent 16816ff commit 839cf4d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions db/system_keyspace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ namespace {
props.wait_for_sync_to_commitlog = true;
}
});
const auto set_use_schema_commitlog = schema_builder::register_static_configurator([](const sstring& ks_name, const sstring& cf_name, schema_static_props& props) {
static const std::unordered_set<sstring> raft_tables = {
system_keyspace::RAFT,
system_keyspace::RAFT_SNAPSHOTS,
system_keyspace::RAFT_SNAPSHOT_CONFIG,
system_keyspace::GROUP0_HISTORY,
system_keyspace::DISCOVERY
};
if (ks_name == system_keyspace::NAME && raft_tables.contains(cf_name)) {
props.use_schema_commitlog = true;
props.load_phase = system_table_load_phase::phase2;
}
});
}

std::unique_ptr<query_context> qctx = {};
Expand Down

0 comments on commit 839cf4d

Please sign in to comment.