mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 06:23:03 +00:00
raft: separate group0 server start from in-memory state machine enablement
Split start_server_for_group0 so it only starts the raft server and replays the log (applying mutations to system tables), without loading the state into memory. A new enable_group0_state_machine() method is added which callers must invoke explicitly after all dependencies (CDC generation service, non-system schemas, etc.) are available. This prepares for moving setup_group0_if_exist earlier in the startup sequence so the raft log can be replayed before non-system keyspaces are loaded, while deferring the in-memory state loading until after all dependencies are initialized.
This commit is contained in:
@@ -1127,6 +1127,7 @@ private:
|
||||
|
||||
if (!group0_service.maintenance_mode() && _sys_ks.local().bootstrap_complete()) {
|
||||
group0_service.setup_group0_if_exist(_sys_ks.local(), _ss.local(), _qp.local(), _mm.local()).get();
|
||||
group0_service.enable_group0_state_machine().get();
|
||||
}
|
||||
_groups_manager.invoke_on_all([](service::strong_consistency::groups_manager& m) {
|
||||
return m.start();
|
||||
|
||||
Reference in New Issue
Block a user