mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 13:06:57 +00:00
service: raft: add support for topology_change command into raft_group0_client
Extend raft_group0_client::prepare_command with support of topology_change type of command.
This commit is contained in:
@@ -283,7 +283,9 @@ future<group0_guard> raft_group0_client::start_operation(seastar::abort_source*
|
||||
}
|
||||
}
|
||||
|
||||
group0_command raft_group0_client::prepare_command(schema_change change, group0_guard& guard, std::string_view description) {
|
||||
template<typename Command>
|
||||
requires std::same_as<Command, schema_change> || std::same_as<Command, topology_change>
|
||||
group0_command raft_group0_client::prepare_command(Command change, group0_guard& guard, std::string_view description) {
|
||||
group0_command group0_cmd {
|
||||
.change{std::move(change)},
|
||||
.history_append{db::system_keyspace::make_group0_history_state_id_mutation(
|
||||
@@ -411,4 +413,7 @@ void raft_group0_client::set_query_result(utils::UUID query_id, service::broadca
|
||||
}
|
||||
}
|
||||
|
||||
template group0_command raft_group0_client::prepare_command(schema_change change, group0_guard& guard, std::string_view description);
|
||||
template group0_command raft_group0_client::prepare_command(topology_change change, group0_guard& guard, std::string_view description);
|
||||
|
||||
}
|
||||
|
||||
@@ -127,8 +127,10 @@ public:
|
||||
// and add_entry would again forward to shard 0.
|
||||
future<group0_guard> start_operation(seastar::abort_source* as = nullptr);
|
||||
|
||||
group0_command prepare_command(schema_change change, group0_guard& guard, std::string_view description);
|
||||
group0_command prepare_command(broadcast_table_query query);
|
||||
template<typename Command>
|
||||
requires std::same_as<Command, schema_change> || std::same_as<Command, topology_change>
|
||||
group0_command prepare_command(Command change, group0_guard& guard, std::string_view description);
|
||||
|
||||
// Returns the current group 0 upgrade state.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user