mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 12:17:02 +00:00
raft: pass server id to raft_sys_table_storage instance
Preparations for changing raft snapshots schema. Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>
This commit is contained in:
@@ -88,7 +88,7 @@ static std::vector<raft::log_entry_ptr> create_test_log() {
|
||||
SEASTAR_TEST_CASE(test_store_load_term_and_vote) {
|
||||
return do_with_cql_env([] (cql_test_env& env) -> future<> {
|
||||
cql3::query_processor& qp = env.local_qp();
|
||||
raft_sys_table_storage storage(qp, gid);
|
||||
raft_sys_table_storage storage(qp, gid, raft::server_id::create_random_id());
|
||||
|
||||
raft::term_t vote_term(1);
|
||||
auto vote_id = raft::server_id::create_random_id();
|
||||
@@ -104,7 +104,7 @@ SEASTAR_TEST_CASE(test_store_load_term_and_vote) {
|
||||
SEASTAR_TEST_CASE(test_store_load_snapshot) {
|
||||
return do_with_cql_env([] (cql_test_env& env) -> future<> {
|
||||
cql3::query_processor& qp = env.local_qp();
|
||||
raft_sys_table_storage storage(qp, gid);
|
||||
raft_sys_table_storage storage(qp, gid, raft::server_id::create_random_id());
|
||||
|
||||
raft::term_t snp_term(1);
|
||||
raft::index_t snp_idx(1);
|
||||
@@ -130,7 +130,7 @@ SEASTAR_TEST_CASE(test_store_load_snapshot) {
|
||||
SEASTAR_TEST_CASE(test_store_load_log_entries) {
|
||||
return do_with_cql_env([] (cql_test_env& env) -> future<> {
|
||||
cql3::query_processor& qp = env.local_qp();
|
||||
raft_sys_table_storage storage(qp, gid);
|
||||
raft_sys_table_storage storage(qp, gid, raft::server_id::create_random_id());
|
||||
|
||||
std::vector<raft::log_entry_ptr> entries = create_test_log();
|
||||
co_await storage.store_log_entries(entries);
|
||||
@@ -146,7 +146,7 @@ SEASTAR_TEST_CASE(test_store_load_log_entries) {
|
||||
SEASTAR_TEST_CASE(test_truncate_log) {
|
||||
return do_with_cql_env([] (cql_test_env& env) -> future<> {
|
||||
cql3::query_processor& qp = env.local_qp();
|
||||
raft_sys_table_storage storage(qp, gid);
|
||||
raft_sys_table_storage storage(qp, gid, raft::server_id::create_random_id());
|
||||
|
||||
std::vector<raft::log_entry_ptr> entries = create_test_log();
|
||||
co_await storage.store_log_entries(entries);
|
||||
@@ -164,7 +164,7 @@ SEASTAR_TEST_CASE(test_truncate_log) {
|
||||
SEASTAR_TEST_CASE(test_store_snapshot_truncate_log_tail) {
|
||||
return do_with_cql_env([] (cql_test_env& env) -> future<> {
|
||||
cql3::query_processor& qp = env.local_qp();
|
||||
raft_sys_table_storage storage(qp, gid);
|
||||
raft_sys_table_storage storage(qp, gid, raft::server_id::create_random_id());
|
||||
|
||||
std::vector<raft::log_entry_ptr> entries = create_test_log();
|
||||
co_await storage.store_log_entries(entries);
|
||||
|
||||
Reference in New Issue
Block a user