mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
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:
@@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user