We weren't previously handling the deallocation of the store when
a realm was reloaded. Now passing a const reference to the pointer.
Fixes: https://tracker.ceph.com/issues/54130
Signed-off-by: Cory Snyder <csnyder@iland.com>
(cherry picked from commit
0713f65355586b2f6ceeb6bbce8763158847e5ed)
return 0;
}
-OpsLogRados::OpsLogRados(rgw::sal::Store* store): store(store)
+OpsLogRados::OpsLogRados(rgw::sal::Store* const& store): store(store)
{
}
};
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;
};