cql3: Define prepared_statement weak pointer as const

The pointer points to immutable prepared_statement, so tune up the type
respectively. Tracing has its own alieas for it, fix one too.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2024-05-25 16:21:02 +03:00
parent de798775fd
commit 828862bdff
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ struct invalidated_prepared_usage_attempt {
class prepared_statement : public seastar::weakly_referencable<prepared_statement> {
public:
typedef seastar::checked_ptr<seastar::weak_ptr<prepared_statement>> checked_weak_ptr;
typedef seastar::checked_ptr<seastar::weak_ptr<const prepared_statement>> checked_weak_ptr;
public:
const seastar::shared_ptr<cql_statement> statement;
@@ -51,7 +51,7 @@ public:
prepared_statement(seastar::shared_ptr<cql_statement>&& statement_);
checked_weak_ptr checked_weak_from_this() {
checked_weak_ptr checked_weak_from_this() const {
return checked_weak_ptr(this->weak_from_this());
}
};

View File

@@ -35,7 +35,7 @@ namespace tracing {
extern logging::logger trace_state_logger;
using prepared_checked_weak_ptr = seastar::checked_ptr<seastar::weak_ptr<cql3::statements::prepared_statement>>;
using prepared_checked_weak_ptr = seastar::checked_ptr<seastar::weak_ptr<const cql3::statements::prepared_statement>>;
class trace_state final {
public: