Fixes: https://tracker.ceph.com/issues/58231
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
41b402fe9428e56bbbf7a9055837c78ae90d607a)
Conflicts:
src/rgw/rgw_op.cc
src/rgw/rgw_sal.h
src/rgw/rgw_sal_daos.h
src/rgw/rgw_sal_dbstore.cc
src/rgw/rgw_sal_dbstore.h
src/rgw/rgw_sal_filter.cc
src/rgw/rgw_sal_filter.h
src/rgw/rgw_sal_motr.h
src/rgw/rgw_sal_rados.cc
src/rgw/rgw_sal_rados.h
Cherry-pick notes:
- rgw_op.cc: member variable was renamed from store to driver
- rgw_sal.h: get_notification req_state param previously had struct keyword
- rgw_sal_dbstore.cc: get_notification req_state param previously had struct keyword
- rgw_sal_dbstore.h: get_notification req_state param previously had struct keyword
- rgw_sal_rados.cc: get_notification req_state param previously had struct keyword
- rgw_sal_rados.h: Notification was renamed to StoreNotification
- rgw_sal_motr.h: did not exist in Quincy release
- rgw_sal_filter.cc/.h: did not exist in Quincy release
- rgw_sal_daos.h: did not exist in Quincy release
std::unique_ptr<rgw::sal::Notification> res
= store->get_notification(
s->object.get(), s->src_object.get(), s,
- rgw::notify::ObjectCreatedPut);
+ rgw::notify::ObjectCreatedPut, y);
if(!multipart) {
op_ret = res->publish_reserve(this, obj_tags.get());
if (op_ret < 0) {
// make reservation for notification if needed
std::unique_ptr<rgw::sal::Notification> res
- = store->get_notification(s->object.get(), s->src_object.get(), s, rgw::notify::ObjectCreatedPost);
+ = store->get_notification(s->object.get(), s->src_object.get(), s, rgw::notify::ObjectCreatedPost, y);
op_ret = res->publish_reserve(this);
if (op_ret < 0) {
return;
rgw::notify::ObjectRemovedDelete;
std::unique_ptr<rgw::sal::Notification> res
= store->get_notification(s->object.get(), s->src_object.get(), s,
- event_type);
+ event_type, y);
op_ret = res->publish_reserve(this);
if (op_ret < 0) {
return;
std::unique_ptr<rgw::sal::Notification> res
= store->get_notification(
s->object.get(), s->src_object.get(),
- s, rgw::notify::ObjectCreatedCopy);
+ s, rgw::notify::ObjectCreatedCopy, y);
op_ret = res->publish_reserve(this);
if (op_ret < 0) {
return;
// make reservation for notification if needed
std::unique_ptr<rgw::sal::Notification> res
- = store->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, &s->object->get_name());
+ = store->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, y, &s->object->get_name());
op_ret = res->publish_reserve(this);
if (op_ret < 0) {
return;
rgw::notify::ObjectRemovedDeleteMarkerCreated :
rgw::notify::ObjectRemovedDelete;
std::unique_ptr<rgw::sal::Notification> res
- = store->get_notification(obj.get(), s->src_object.get(), s, event_type);
+ = store->get_notification(obj.get(), s->src_object.get(), s, event_type, y);
op_ret = res->publish_reserve(this);
if (op_ret < 0) {
send_partial_response(o, false, "", op_ret, formatter_flush_cond);
* management/tracking software */
/** RGWOp variant */
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
- rgw::notify::EventType event_type, const std::string* object_name=nullptr) = 0;
+ rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) = 0;
/** No-req_state variant (e.g., rgwlc) */
virtual std::unique_ptr<Notification> get_notification(
const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj, RGWObjectCtx* rctx,
std::unique_ptr<Notification> DBStore::get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
- rgw::notify::EventType event_type, const std::string* object_name)
+ rgw::notify::EventType event_type, optional_yield y,
+ const std::string* object_name)
{
return std::make_unique<DBNotification>(obj, src_obj, event_type);
}
virtual std::unique_ptr<Notification> get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
- rgw::notify::EventType event_type, const std::string* object_name) override;
+ rgw::notify::EventType event_type, optional_yield y, const std::string* object_name) override;
virtual std::unique_ptr<Notification> get_notification(
const DoutPrefixProvider* dpp, rgw::sal::Object* obj,
}
std::unique_ptr<Notification> RadosStore::get_notification(
- rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, const std::string* object_name)
+ rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name)
{
- return std::make_unique<RadosNotification>(s, this, obj, src_obj, s, event_type, object_name);
+ return std::make_unique<RadosNotification>(s, this, obj, src_obj, s, event_type, y, object_name);
}
std::unique_ptr<Notification> RadosStore::get_notification(const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj, RGWObjectCtx* rctx, rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y)
virtual std::unique_ptr<Completions> get_completions(void) override;
// op variant
- virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, const std::string* object_name=nullptr) override;
+ virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) override;
// non-op variant (e.g., rgwlc)
virtual std::unique_ptr<Notification> get_notification(const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj, RGWObjectCtx* rctx, rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y) override;
rgw::notify::reservation_t res;
public:
- RadosNotification(const DoutPrefixProvider* _dpp, RadosStore* _store, Object* _obj, Object* _src_obj, req_state* _s, rgw::notify::EventType _type, const std::string* object_name=nullptr) :
- Notification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _s, _obj, _src_obj, object_name, _s->yield) { }
+ RadosNotification(const DoutPrefixProvider* _dpp, RadosStore* _store, Object* _obj, Object* _src_obj, req_state* _s, rgw::notify::EventType _type, optional_yield y, const std::string* object_name) :
+ Notification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _s, _obj, _src_obj, object_name, y) { }
RadosNotification(const DoutPrefixProvider* _dpp, RadosStore* _store, Object* _obj, Object* _src_obj, RGWObjectCtx* rctx, rgw::notify::EventType _type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y) :
Notification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, rctx, _obj, _src_obj, _bucket, _user_id, _user_tenant, _req_id, y) {}