From 0f0c3be63e4f1bfbcdde988a7bdd7f5fa54d9c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Mon, 1 Mar 2021 10:35:23 +0200 Subject: [PATCH] multishard_mutation_query: query_mutations_on_all_shards(): refuse reverse queries Refuse reverse queries just like in the new `query_data_on_all_shards()`. The reason is the same, reverse range scans are not supported on the client API level and hence they are underspecified and more importantly: not tested. --- multishard_mutation_query.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/multishard_mutation_query.cc b/multishard_mutation_query.cc index 649ef82320..5059915ccc 100644 --- a/multishard_mutation_query.cc +++ b/multishard_mutation_query.cc @@ -774,6 +774,9 @@ future>, cache_tempera const dht::partition_range_vector& ranges, tracing::trace_state_ptr trace_state, db::timeout_clock::time_point timeout) { + if (cmd.slice.options.contains(query::partition_slice::option::reversed)) { + throw std::runtime_error("query_mutations_on_all_shards(): reverse range scans are not supported"); + } return do_query_on_all_shards(db, s, cmd, ranges, std::move(trace_state), timeout, [s, &cmd] (query::result_memory_accounter&& accounter) { return mutation_query_result_builder(*s, cmd.slice, std::move(accounter));