]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: handle object stat output of attrs 56226/head
authorShilpa Jagannath <smanjara@redhat.com>
Tue, 13 Feb 2024 16:03:04 +0000 (11:03 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 15 Mar 2024 15:21:53 +0000 (11:21 -0400)
"user.rgw.replicated-at"

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit 626179f7a265a9ffc2bcac187709a04fbbc24e17)

PendingReleaseNotes
src/rgw/rgw_admin.cc

index e28c35efce53bd31caf3ceae7de369f6eb02c4a7..da24bebfc611bb4cb91f1a2459972645cb819a9c 100644 (file)
@@ -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
index 0be8dacf862bc4df46b427003e5b188bed6b55e0..4d4e76c74e88ef40c38838ca12c8bcfbc7472b83 100644 (file)
@@ -8367,7 +8367,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<ceph::real_time>("user.rgw.replicated-at", bl, formatter.get());
+      } else {
+        dump_string(iter->first.c_str(), iter->second, formatter.get());
+      }
     }
     formatter->close_section();
     formatter->close_section();