querier: remove now unused cache_context

This commit is contained in:
Botond Dénes
2021-06-16 10:57:24 +03:00
parent 7f2813e3fa
commit f37e26c73d
2 changed files with 0 additions and 79 deletions

View File

@@ -453,58 +453,4 @@ future<> querier_cache::stop() noexcept {
}
}
querier_cache_context::querier_cache_context(querier_cache& cache, utils::UUID key, query::is_first_page is_first_page)
: _cache(&cache)
, _key(key)
, _is_first_page(is_first_page) {
}
void querier_cache_context::insert(data_querier&& q, tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{}) {
_cache->insert(_key, std::move(q), std::move(trace_state));
}
}
void querier_cache_context::insert(mutation_querier&& q, tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{}) {
_cache->insert(_key, std::move(q), std::move(trace_state));
}
}
void querier_cache_context::insert(shard_mutation_querier&& q, tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{}) {
_cache->insert(_key, std::move(q), std::move(trace_state));
}
}
std::optional<data_querier> querier_cache_context::lookup_data_querier(const schema& s,
const dht::partition_range& range,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{} && !_is_first_page) {
return _cache->lookup_data_querier(_key, s, range, slice, std::move(trace_state));
}
return std::nullopt;
}
std::optional<mutation_querier> querier_cache_context::lookup_mutation_querier(const schema& s,
const dht::partition_range& range,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{} && !_is_first_page) {
return _cache->lookup_mutation_querier(_key, s, range, slice, std::move(trace_state));
}
return std::nullopt;
}
std::optional<shard_mutation_querier> querier_cache_context::lookup_shard_mutation_querier(const schema& s,
const dht::partition_range_vector& ranges,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state) {
if (_cache && _key != utils::UUID{} && !_is_first_page) {
return _cache->lookup_shard_mutation_querier(_key, s, ranges, slice, std::move(trace_state));
}
return std::nullopt;
}
} // namespace query

View File

@@ -470,29 +470,4 @@ public:
}
};
class querier_cache_context {
querier_cache* _cache{};
utils::UUID _key;
query::is_first_page _is_first_page;
public:
querier_cache_context() = default;
querier_cache_context(querier_cache& cache, utils::UUID key, query::is_first_page is_first_page);
void insert(data_querier&& q, tracing::trace_state_ptr trace_state);
void insert(mutation_querier&& q, tracing::trace_state_ptr trace_state);
void insert(shard_mutation_querier&& q, tracing::trace_state_ptr trace_state);
std::optional<data_querier> lookup_data_querier(const schema& s,
const dht::partition_range& range,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state);
std::optional<mutation_querier> lookup_mutation_querier(const schema& s,
const dht::partition_range& range,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state);
std::optional<shard_mutation_querier> lookup_shard_mutation_querier(const schema& s,
const dht::partition_range_vector& ranges,
const query::partition_slice& slice,
tracing::trace_state_ptr trace_state);
};
} // namespace query