diff --git a/cql3/statements/describe_statement.cc b/cql3/statements/describe_statement.cc index c254ac734b..48384b2960 100644 --- a/cql3/statements/describe_statement.cc +++ b/cql3/statements/describe_statement.cc @@ -49,7 +49,6 @@ #include "cql3/functions/user_function.hh" #include "cql3/functions/user_aggregate.hh" #include "utils/overloaded_functor.hh" -#include "db/config.hh" #include "db/system_keyspace.hh" #include "db/extensions.hh" #include "utils/sorting.hh" @@ -614,17 +613,14 @@ future cluster_describe_statement::range_ownership(const serv } future>> cluster_describe_statement::describe(cql3::query_processor& qp, const service::client_state& client_state) const { - auto db = qp.db(); auto& proxy = qp.proxy(); + auto& ss = qp.storage_service(); - auto cluster = to_managed_bytes(db.get_config().cluster_name()); - auto partitioner = to_managed_bytes(db.get_config().partitioner()); - auto snitch = to_managed_bytes(db.get_config().endpoint_snitch()); - + auto cluster_info = ss.describe_cluster(); std::vector row { - {cluster}, - {partitioner}, - {snitch} + {to_managed_bytes(cluster_info.cluster_name)}, + {to_managed_bytes(cluster_info.partitioner)}, + {to_managed_bytes(cluster_info.snitch_name)} }; if (should_add_range_ownership(proxy.local_db(), client_state)) {