mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
locator: abstract_replication_strategy: implement local_replication_strategy
Derive both vnode_effective_replication_map and local_effective_replication_map from static_effective_replication_map as both are static and per-keyspace. However, local_effective_replication_map does not need vnodes for the mapping of all tokens to the local node. Note that everywhere_replication_strategy is not abstracted in a similar way, although it could, since the plan is to get rid of it once all system keyspaces areconverted to local or tablets replication (and propagated everywhere if needed using raft group0) Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -74,7 +74,8 @@ static void verify_sorted(const dht::token_range_vector& trv) {
|
||||
BOOST_CHECK(std::ranges::adjacent_find(trv, not_strictly_before) == trv.end());
|
||||
}
|
||||
|
||||
static future<> check_ranges_are_sorted(static_effective_replication_map_ptr erm, locator::host_id ep) {
|
||||
static future<> check_ranges_are_sorted(static_effective_replication_map_ptr ermp, locator::host_id ep) {
|
||||
auto* erm = ermp->maybe_as_vnode_effective_replication_map();
|
||||
verify_sorted(co_await erm->get_ranges(ep));
|
||||
verify_sorted(co_await erm->get_primary_ranges(ep));
|
||||
verify_sorted(co_await erm->get_primary_ranges_within_dc(ep));
|
||||
|
||||
Reference in New Issue
Block a user