diff --git a/connection_notifier.cc b/client_data.cc similarity index 52% rename from connection_notifier.cc rename to client_data.cc index fdf94bea50..91270c2df3 100644 --- a/connection_notifier.cc +++ b/client_data.cc @@ -6,11 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "connection_notifier.hh" -#include "cql3/constants.hh" -#include "replica/database.hh" -#include "service/storage_proxy.hh" - +#include "client_data.hh" #include sstring to_string(client_type ct) { @@ -24,9 +20,9 @@ sstring to_string(client_type ct) { sstring to_string(client_connection_stage ccs) { switch (ccs) { - case client_connection_stage::established: return connection_stage_literal; - case client_connection_stage::authenticating: return connection_stage_literal; - case client_connection_stage::ready: return connection_stage_literal; + case client_connection_stage::established: return "ESTABLISHED"; + case client_connection_stage::authenticating: return "AUTHENTICATING"; + case client_connection_stage::ready: return "READY"; } throw std::runtime_error("Invalid client_connection_stage"); } diff --git a/connection_notifier.hh b/client_data.hh similarity index 72% rename from connection_notifier.hh rename to client_data.hh index 7874ee2edf..3134737b0c 100644 --- a/connection_notifier.hh +++ b/client_data.hh @@ -7,8 +7,6 @@ */ #pragma once -#include "db/query_context.hh" - #include #include #include "seastarx.hh" @@ -31,11 +29,6 @@ enum class client_connection_stage { sstring to_string(client_connection_stage ct); -template constexpr const char* connection_stage_literal = ""; -template <> inline constexpr const char* connection_stage_literal = "ESTABLISHED"; -template <> inline constexpr const char* connection_stage_literal = "AUTHENTICATING"; -template <> inline constexpr const char* connection_stage_literal = "READY"; - // Representation of a row in `system.clients'. std::optionals are for nullable cells. struct client_data { net::inet_address ip; diff --git a/configure.py b/configure.py index 0e38168de7..20584e9163 100755 --- a/configure.py +++ b/configure.py @@ -665,7 +665,7 @@ scylla_core = (['replica/database.cc', 'atomic_cell.cc', 'caching_options.cc', 'collection_mutation.cc', - 'connection_notifier.cc', + 'client_data.cc', 'hashers.cc', 'schema.cc', 'frozen_schema.cc', diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index fd774bdb07..a25f2fe7dc 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -67,6 +67,7 @@ #include "serializer_impl.hh" #include "idl/frozen_mutation.dist.impl.hh" #include +#include "client_data.hh" using days = std::chrono::duration>; diff --git a/main.cc b/main.cc index a9f9f77160..6d85c1eaab 100644 --- a/main.cc +++ b/main.cc @@ -54,6 +54,7 @@ #include "message/messaging_service.hh" #include "db/sstables-format-selector.hh" #include "db/snapshot-ctl.hh" +#include "cql3/query_processor.hh" #include #include #include @@ -66,7 +67,6 @@ #include "replica/distributed_loader.hh" #include "sstables_loader.hh" #include "cql3/cql_config.hh" -#include "connection_notifier.hh" #include "transport/controller.hh" #include "thrift/controller.hh" #include "service/memory_limiter.hh" diff --git a/protocol_server.hh b/protocol_server.hh index 6cfcb4b360..9fa616082f 100644 --- a/protocol_server.hh +++ b/protocol_server.hh @@ -11,7 +11,7 @@ #include "seastarx.hh" #include #include -#include "connection_notifier.hh" +#include "client_data.hh" #include "utils/chunked_vector.hh" struct client_data; diff --git a/transport/server.cc b/transport/server.cc index 330f82265e..9edd65d969 100644 --- a/transport/server.cc +++ b/transport/server.cc @@ -42,8 +42,8 @@ #include "service/query_state.hh" #include "service/client_state.hh" #include "exceptions/exceptions.hh" -#include "connection_notifier.hh" - +#include "client_data.hh" +#include "cql3/query_processor.hh" #include "auth/authenticator.hh" #include