diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index b1fe316990..1539d8b2e5 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -380,19 +380,4 @@ split_range_to_shards(dht::partition_range pr, const schema& s) { return ret; } -std::map -split_ranges_to_shards(const dht::token_range_vector& ranges, const schema& s) { - std::map ret; - for (const auto& range : ranges) { - auto pr = dht::to_partition_range(range); - auto sharder = dht::ring_position_range_sharder(s.get_sharding_info(), std::move(pr)); - auto rprs = sharder.next(s); - while (rprs) { - ret[rprs->shard].emplace_back(rprs->ring_range); - rprs = sharder.next(s); - } - } - return ret; -} - } diff --git a/dht/i_partitioner.hh b/dht/i_partitioner.hh index 6559c27759..e0a1d91e3a 100644 --- a/dht/i_partitioner.hh +++ b/dht/i_partitioner.hh @@ -662,11 +662,6 @@ dht::partition_range_vector to_partition_ranges(const dht::token_range_vector& r std::map split_range_to_shards(dht::partition_range pr, const schema& s); -// If input ranges are sorted and disjoint then the ranges for each shard -// are also sorted and disjoint. -std::map -split_ranges_to_shards(const dht::token_range_vector& ranges, const schema& s); - // Intersect a partition_range with a shard and return the the resulting sub-ranges, in sorted order future> split_range_to_single_shard(const schema& s, const dht::partition_range& pr, shard_id shard);