mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 08:23:29 +00:00
raft: replication test: move up set_config
Move set_config above raft_cluster for a subsequent commit. Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
This commit is contained in:
@@ -396,6 +396,16 @@ public:
|
||||
|
||||
std::unordered_map<raft::server_id, rpc*> rpc::net;
|
||||
|
||||
struct set_config_entry {
|
||||
size_t node_idx;
|
||||
bool can_vote;
|
||||
|
||||
set_config_entry(size_t idx, bool can_vote = true)
|
||||
: node_idx(idx), can_vote(can_vote)
|
||||
{}
|
||||
};
|
||||
using set_config = std::vector<set_config_entry>;
|
||||
|
||||
struct test_server {
|
||||
std::unique_ptr<raft::server> server;
|
||||
state_machine* sm;
|
||||
@@ -559,16 +569,6 @@ struct leader {
|
||||
};
|
||||
using partition = std::vector<std::variant<leader,int>>;
|
||||
|
||||
struct set_config_entry {
|
||||
size_t node_idx;
|
||||
bool can_vote;
|
||||
|
||||
set_config_entry(size_t idx, bool can_vote = true)
|
||||
: node_idx(idx), can_vote(can_vote)
|
||||
{}
|
||||
};
|
||||
using set_config = std::vector<set_config_entry>;
|
||||
|
||||
struct tick {
|
||||
uint64_t ticks;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user