From d7af8ff0e07944ef07886cc3e87fe66ec0e8f2fe Mon Sep 17 00:00:00 2001 From: Duarte Nunes Date: Wed, 10 Jan 2018 17:51:14 +0000 Subject: [PATCH] service/storage_proxy: Enable hash caching Set the option that enables the underlying memtable and cache readers to request caching of a cell's hash, for requests that require a digest. Signed-off-by: Duarte Nunes --- service/storage_proxy.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index b67e777132..a12c9eb53f 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -2921,6 +2921,7 @@ storage_proxy::query_result_local_digest(schema_ptr s, lw_shared_ptr>, cache_temperature> storage_proxy::query_result_local(schema_ptr s, lw_shared_ptr cmd, const dht::partition_range& pr, query::result_options opts, tracing::trace_state_ptr trace_state, storage_proxy::clock_type::time_point timeout, uint64_t max_size) { + cmd->slice.options.set_if(opts.request != query::result_request::only_result); if (pr.is_singular()) { unsigned shard = _db.local().shard_of(pr.start()->value().token()); return _db.invoke_on(shard, [max_size, gs = global_schema_ptr(s), prv = dht::partition_range_vector({pr}) /* FIXME: pr is copied */, cmd, opts, timeout, gt = tracing::global_trace_state_ptr(std::move(trace_state))] (database& db) mutable {