From 02295f90ec52cab10eb0599351c60251a03f79f8 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 --- src/rgw/driver/rados/rgw_cr_rados.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/rgw/driver/rados/rgw_cr_rados.cc b/src/rgw/driver/rados/rgw_cr_rados.cc index 41d5bed4a55..3e367984ecf 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) -- 2.39.5