i_partitioner: remove unused split_ranges_to_shards

The function is never called so it can be safely removed.

Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com>
This commit is contained in:
Piotr Jastrzebski
2020-03-13 18:00:49 +01:00
parent bdb7e89048
commit 2aaa33d02e
2 changed files with 0 additions and 20 deletions

View File

@@ -380,19 +380,4 @@ split_range_to_shards(dht::partition_range pr, const schema& s) {
return ret;
}
std::map<unsigned, dht::partition_range_vector>
split_ranges_to_shards(const dht::token_range_vector& ranges, const schema& s) {
std::map<unsigned, dht::partition_range_vector> 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;
}
}

View File

@@ -662,11 +662,6 @@ dht::partition_range_vector to_partition_ranges(const dht::token_range_vector& r
std::map<unsigned, dht::partition_range_vector>
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<unsigned, dht::partition_range_vector>
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<utils::chunked_vector<partition_range>> split_range_to_single_shard(const schema& s, const dht::partition_range& pr, shard_id shard);