mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
querier: remove now unused cache_context
This commit is contained in:
54
querier.cc
54
querier.cc
@@ -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
|
||||
|
||||
25
querier.hh
25
querier.hh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user