From fc158a2ec41d4cd790cd02690c86c48b97601fd0 Mon Sep 17 00:00:00 2001 From: kchheda3 Date: Wed, 24 Apr 2024 12:36:44 -0400 Subject: [PATCH] rgw/notification: Do not block sending replication notification events for processing for object tag decode errors. This was the behavior prior to https://github.com/ceph/ceph/pull/55795, however while refactoring this behavior was changed, hence revert back the logic to not send the events if the obj_tag decoding fails. Signed-off-by: kchheda3 (cherry picked from commit 02295f90ec52cab10eb0599351c60251a03f79f8) --- src/rgw/driver/rados/rgw_cr_rados.cc | 18 ++++++++---------- src/rgw/rgw_lc.cc | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/rgw/driver/rados/rgw_cr_rados.cc b/src/rgw/driver/rados/rgw_cr_rados.cc index 396c556926f3e..db60ccb7b7c4c 100644 --- a/src/rgw/driver/rados/rgw_cr_rados.cc +++ b/src/rgw/driver/rados/rgw_cr_rados.cc @@ -717,13 +717,13 @@ int RGWRadosBILogTrimCR::request_complete() return r; } -int send_sync_notification(const DoutPrefixProvider* dpp, - rgw::sal::RadosStore* store, - rgw::sal::Bucket* bucket, - rgw::sal::Object* obj, - const rgw::sal::Attrs& attrs, - uint64_t obj_size, - const rgw::notify::EventTypeList& event_types) { +void send_sync_notification(const DoutPrefixProvider* dpp, + rgw::sal::RadosStore* store, + rgw::sal::Bucket* bucket, + rgw::sal::Object* obj, + const rgw::sal::Attrs& attrs, + uint64_t obj_size, + const rgw::notify::EventTypeList& event_types) { // send notification that object was successfully synced std::string user_id = "rgw sync"; std::string req_id = "0"; @@ -738,7 +738,6 @@ int send_sync_notification(const DoutPrefixProvider* dpp, ldpp_dout(dpp, 1) << "ERROR: " << __func__ << ": caught buffer::error couldn't decode TagSet " << dendl; - return -EIO; } } // bucket attrs are required for notification and since its not loaded, @@ -748,7 +747,7 @@ int send_sync_notification(const DoutPrefixProvider* dpp, ldpp_dout(dpp, 1) << "ERROR: failed to load bucket attrs for bucket:" << bucket->get_name() << " with error ret= " << r << " . Not sending notification" << dendl; - return r; + return; } rgw::notify::reservation_t notify_res(dpp, store, obj, nullptr, bucket, user_id, bucket->get_tenant(), req_id, @@ -772,7 +771,6 @@ int send_sync_notification(const DoutPrefixProvider* dpp, << ret << dendl; } } - return ret; } int RGWAsyncFetchRemoteObj::_send_request(const DoutPrefixProvider *dpp) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index cb1b92a04e7b6..a91b830139723 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1413,7 +1413,6 @@ public: if (iter != obj_state->attrset.end()) { etag = rgw_bl_str(iter->second); } -<<<<<<< HEAD rgw::notify::EventTypeList event_types; if (bucket->versioned() && oc.o.is_current() && !oc.o.is_delete_marker()) { -- 2.39.5