From 18581cfb76472f65a88b6b40817a4331da652ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Fri, 23 Aug 2019 14:51:11 +0300 Subject: [PATCH] multishard_mutation_query: create_readr(): use the caller's priority class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The priority class the shard reader was created with was hardcoded to be `service::get_local_sstable_query_read_priority()`. At the time this code was written, priority classes could not be passed to other shards, so this method, receiving its priority class parameters from another shard, could not use it. This is now fixed, so we can just use whatever the caller wants us to use. Signed-off-by: Botond Dénes Message-Id: <20190823115111.68711-1-bdenes@scylladb.com> --- multishard_mutation_query.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/multishard_mutation_query.cc b/multishard_mutation_query.cc index 2e2369d297..798d3b7571 100644 --- a/multishard_mutation_query.cc +++ b/multishard_mutation_query.cc @@ -262,7 +262,7 @@ flat_mutation_reader read_context::create_reader( schema_ptr schema, const dht::partition_range& pr, const query::partition_slice& ps, - const io_priority_class&, + const io_priority_class& pc, tracing::trace_state_ptr trace_state, mutation_reader::forwarding) { const auto shard = engine().cpu_id(); @@ -290,8 +290,6 @@ flat_mutation_reader read_context::create_reader( rm.rparts = make_foreign(std::make_unique(table.read_concurrency_semaphore())); } - //TODO need a way to transport io_priority_calls across shards - auto& pc = service::get_local_sstable_query_read_priority(); rm.rparts->range = std::make_unique(pr); rm.rparts->slice = std::make_unique(ps); rm.rparts->read_operation = table.read_in_progress();