Files
scylladb/cql3/statements/service_level_statement.cc
Michał Jadwiszczak da82c5f0b0 cql3:statements: run service level statements on shard0 with raft guard
To migrate service levels to be raft managed, obtain `group0_guard` to
be able to pass it to service_level_controller's methods.

Using this mechanism also automatically provides retries in case of
concurrent group0 operation.
2024-03-21 23:14:57 +01:00

33 lines
706 B
C++

/*
* Copyright (C) 2021-present ScyllaDB
*/
/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include "service_level_statement.hh"
namespace cql3 {
namespace statements {
uint32_t service_level_statement::get_bound_terms() const {
return 0;
}
bool service_level_statement::depends_on(std::string_view ks_name, std::optional<std::string_view> cf_name) const {
return false;
}
future<> service_level_statement::check_access(query_processor& qp, const service::client_state &state) const {
return make_ready_future<>();
}
bool service_level_statement::needs_guard(query_processor&, service::query_state& state) const {
return state.get_service_level_controller().is_v2();
}
}
}