diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 4214708ef15..bd2c360655c 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -472,7 +472,7 @@ int OpsLogSocket::log_json(struct req_state* s, bufferlist& bl) return 0; } -OpsLogRados::OpsLogRados(rgw::sal::Store* store): store(store) +OpsLogRados::OpsLogRados(rgw::sal::Store* const& store): store(store) { } diff --git a/src/rgw/rgw_log.h b/src/rgw/rgw_log.h index a087aa13098..3495ef08629 100644 --- a/src/rgw/rgw_log.h +++ b/src/rgw/rgw_log.h @@ -199,9 +199,11 @@ public: }; class OpsLogRados : public OpsLogSink { - rgw::sal::Store* store; + // main()'s Store pointer as a reference, possibly modified by RGWRealmReloader + rgw::sal::Store* const& store; + public: - OpsLogRados(rgw::sal::Store* store); + OpsLogRados(rgw::sal::Store* const& store); int log(struct req_state* s, struct rgw_log_entry& entry) override; };