create_keyspace_statement: Do not use proxy.shared_from_this()

The prepare_schema_mutations is not sleeping method, so there's no
point in getting call-local shared pointer on proxy. Plain reference
is more than enough.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2021-12-23 11:27:21 +03:00
parent b29d3f1758
commit ec101e8b56

View File

@@ -115,8 +115,7 @@ void create_keyspace_statement::validate(query_processor&, const service::client
future<std::pair<::shared_ptr<cql_transport::event::schema_change>, std::vector<mutation>>> create_keyspace_statement::prepare_schema_mutations(query_processor& qp) const {
using namespace cql_transport;
auto p = qp.proxy().shared_from_this();
const auto& tm = *p->get_token_metadata_ptr();
const auto& tm = *qp.proxy().get_token_metadata_ptr();
::shared_ptr<event::schema_change> ret;
std::vector<mutation> m;