mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 11:55:15 +00:00
locator: Keep optional initial_tablets on r.s. params
Now all the callers have it at hands (spoiler: not yet initialized, but still) so the params can also have it. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -267,7 +267,7 @@ void simple_test() {
|
||||
{"101", "2"},
|
||||
{"102", "3"}
|
||||
};
|
||||
locator::replication_strategy_params params323(options323);
|
||||
locator::replication_strategy_params params323(options323, std::nullopt);
|
||||
|
||||
auto ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params323);
|
||||
@@ -281,7 +281,7 @@ void simple_test() {
|
||||
{"101", "2"},
|
||||
{"102", "0"}
|
||||
};
|
||||
locator::replication_strategy_params params320(options320);
|
||||
locator::replication_strategy_params params320(options320, std::nullopt);
|
||||
|
||||
ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params320);
|
||||
@@ -367,7 +367,7 @@ void heavy_origin_test() {
|
||||
}
|
||||
}).get();
|
||||
|
||||
locator::replication_strategy_params params(config_options);
|
||||
locator::replication_strategy_params params(config_options, std::nullopt);
|
||||
auto ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params);
|
||||
|
||||
@@ -435,7 +435,7 @@ SEASTAR_THREAD_TEST_CASE(NetworkTopologyStrategy_tablets_test) {
|
||||
{"102", "3"},
|
||||
{"initial_tablets", "100"}
|
||||
};
|
||||
locator::replication_strategy_params params323(options323);
|
||||
locator::replication_strategy_params params323(options323, std::nullopt);
|
||||
|
||||
auto ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params323);
|
||||
@@ -459,7 +459,7 @@ SEASTAR_THREAD_TEST_CASE(NetworkTopologyStrategy_tablets_test) {
|
||||
{"102", "0"},
|
||||
{"initial_tablets", "100"}
|
||||
};
|
||||
locator::replication_strategy_params params320(options320);
|
||||
locator::replication_strategy_params params320(options320, std::nullopt);
|
||||
|
||||
ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params320);
|
||||
@@ -476,7 +476,7 @@ SEASTAR_THREAD_TEST_CASE(NetworkTopologyStrategy_tablets_test) {
|
||||
{"102", "2"},
|
||||
{"initial_tablets", "100"}
|
||||
};
|
||||
locator::replication_strategy_params params324(options324);
|
||||
locator::replication_strategy_params params324(options324, std::nullopt);
|
||||
|
||||
ars_ptr = abstract_replication_strategy::create_replication_strategy(
|
||||
"NetworkTopologyStrategy", params324);
|
||||
@@ -654,7 +654,7 @@ static void test_equivalence(const shared_token_metadata& stm, const locator::to
|
||||
| boost::adaptors::transformed(
|
||||
[](const std::pair<sstring, size_t>& p) {
|
||||
return std::make_pair(p.first, to_sstring(p.second));
|
||||
}))));
|
||||
})), std::nullopt));
|
||||
|
||||
const token_metadata& tm = *stm.get();
|
||||
for (size_t i = 0; i < 1000; ++i) {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace {
|
||||
mutable_vnode_erm_ptr create_erm(mutable_token_metadata_ptr tmptr, replication_strategy_config_options opts = {}) {
|
||||
dc_rack_fn get_dc_rack_fn = get_dc_rack;
|
||||
tmptr->update_topology_change_info(get_dc_rack_fn).get();
|
||||
auto strategy = seastar::make_shared<Strategy>(replication_strategy_params(opts));
|
||||
auto strategy = seastar::make_shared<Strategy>(replication_strategy_params(opts, std::nullopt));
|
||||
return calculate_effective_replication_map(std::move(strategy), tmptr).get0();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user