From 626179f7a265a9ffc2bcac187709a04fbbc24e17 Mon Sep 17 00:00:00 2001 From: Shilpa Jagannath Date: Tue, 13 Feb 2024 11:03:04 -0500 Subject: [PATCH] rgw/multisite: handle object stat output of attrs "user.rgw.replicated-at" Signed-off-by: Shilpa Jagannath --- PendingReleaseNotes | 3 +++ src/rgw/rgw_admin.cc | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 0ecec83ec81f9..ecc52f2b67e63 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -1,5 +1,8 @@ >=19.0.0 +* RGW: GetObject and HeadObject requests now return a x-rgw-replicated-at + header for replicated objects. This timestamp can be compared against the + Last-Modified header to determine how long the object took to replicate. * The cephfs-shell utility is now packaged for RHEL 9 / CentOS 9 as required python dependencies are now available in EPEL9. * RGW: S3 multipart uploads using Server-Side Encryption now replicate correctly in diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 8265852973f90..5d0f9eb843799 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -8355,7 +8355,12 @@ next: formatter->open_object_section("attrs"); for (iter = other_attrs.begin(); iter != other_attrs.end(); ++iter) { - dump_string(iter->first.c_str(), iter->second, formatter.get()); + bufferlist& bl = iter->second; + if (iter->first == RGW_ATTR_OBJ_REPLICATION_TIMESTAMP) { + decode_dump("user.rgw.replicated-at", bl, formatter.get()); + } else { + dump_string(iter->first.c_str(), iter->second, formatter.get()); + } } formatter->close_section(); formatter->close_section(); -- 2.39.5