]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notification: notification Event is not printing the correct x_amz_request_id.
authorKrunal Chheda <kchheda3@bloomberg.net>
Mon, 9 Mar 2026 16:41:40 +0000 (12:41 -0400)
committerKrunal Chheda <kchheda3@bloomberg.net>
Mon, 9 Mar 2026 20:23:15 +0000 (16:23 -0400)
For any s3 op, currently the s3->trans_id is returned as the response for x_amz_request_id. So ensure event entry shows the correct x_amz_request_id that matches with s3 op.

Signed-off-by: Krunal Chheda <kchheda3@bloomberg.net>
PendingReleaseNotes
src/rgw/driver/rados/rgw_notify.cc

index 780cb07daaf44015a5cd9992cb15a3802ca914bd..4a39b8eda10e98ec6dd04c6ba1549dbcd5b81296 100644 (file)
@@ -9,6 +9,8 @@
     Configuration file syntax follows the OpenSSL standard (see https://github.com/openssl/openssl/blob/master/doc/man5/config.pod).
     If the default provider is required when also using custom providers,
     it must be explicitly loaded in the configuration file or code (see https://github.com/openssl/openssl/blob/master/README-PROVIDERS.md).
+* RGW: Fixed bucket notification events so the 'x_amz_request_id' in NotificationEvent now matches the 'x_amz_request_id' returned by the corresponding S3 operation.
+
 
 * DASHBOARD: Removed the older landing page which was deprecated in Quincy.
   Admins can no longer enable the older, deprecated landing page layout by
index 9dc2de9843052fb2f31c8dcb20f006d5e263b991..65f4359eed725cb7c1f23a0d8720efc1b44ff898 100644 (file)
@@ -38,14 +38,15 @@ static inline std::ostream& operator<<(std::ostream& out,
   std::string user;
   std::string password;
   parse_url_authority(e.push_endpoint, host, user, password);
-  return out << "notification id: '" << e.event.configurationId
-             << "', topic: '" << e.arn_topic
-             << "', endpoint: '" << host
-             << "', endpoint_user: '" << user
-             << "', bucket_owner: '" << e.event.bucket_ownerIdentity
-             << "', bucket: '" << e.event.bucket_name
-             << "', object: '" << e.event.object_key
-             << "', event type: '" << e.event.eventName << "'";
+  return out << "notification id=" << e.event.configurationId
+             << " topic=" << e.arn_topic << " endpoint=" << host
+             << " endpoint_user=" << user
+             << " bucket_owner=" << e.event.bucket_ownerIdentity
+             << " bucket=" << e.event.bucket_name
+             << " object=" << e.event.object_key
+             << " object_versionId=" << e.event.object_versionId
+             << " x_amz_request_id=" << e.event.x_amz_request_id
+             << " event type=" << e.event.eventName;
 }
 
 struct persistency_tracker {
@@ -258,13 +259,14 @@ private:
     ret = push_endpoint->send(this, event_entry.event, yield);
     if (ret < 0) {
       ldpp_dout(this, 5) << "WARNING: push entry marker: " << entry.marker
-                         << " failed. error: " << ret
+                         << " failed."
                          << " (will retry) for event with " << event_entry
-                         << dendl;
+                         << " ret=" << ret << dendl;
       return EntryProcessingResult::Failure;
     }
     ldpp_dout(this, 5) << "INFO: push entry marker: " << entry.marker
-                       << " ok for event with " << event_entry << dendl;
+                       << " ok for event with " << event_entry << " ret=" << ret
+                       << dendl;
     if (perfcounter)
       perfcounter->inc(l_rgw_pubsub_push_ok);
     return EntryProcessingResult::Successful;
@@ -1394,7 +1396,7 @@ reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
   metadata_fetched_from_attributes(false),
   user_id(to_string(_s->owner.id)),
   user_tenant(_s->user->get_id().tenant),
-  req_id(_s->req_id),
+  req_id(_s->trans_id),
   yield(y)
 {
   filter_amz_meta(x_meta_map, _s->info.x_meta_map);