]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: allow apply_olh_log to rewrite the same olh version 31325/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 1 Nov 2019 14:48:41 +0000 (10:48 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 22 Nov 2019 20:25:33 +0000 (15:25 -0500)
if two zones write an object version with the same olh epoch,
apply_olh_log needs to be able to write the more-current instance at the
same epoch

Fixes: https://tracker.ceph.com/issues/39142
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index acaab993e62739b1defa4d356c16e81468e27fb5..16014ed34632e6a8cc81b104466b259c498b7a5e 100644 (file)
@@ -6797,7 +6797,7 @@ int RGWRados::apply_olh_log(RGWObjectCtx& obj_ctx, RGWObjState& state, const RGW
   map<uint64_t, vector<rgw_bucket_olh_log_entry> >::iterator iter = log.begin();
 
   op.cmpxattr(RGW_ATTR_OLH_ID_TAG, CEPH_OSD_CMPXATTR_OP_EQ, olh_tag);
-  op.cmpxattr(RGW_ATTR_OLH_VER, CEPH_OSD_CMPXATTR_OP_GT, last_ver);
+  op.cmpxattr(RGW_ATTR_OLH_VER, CEPH_OSD_CMPXATTR_OP_GTE, last_ver);
 
   bufferlist ver_bl;
   string last_ver_s = to_string(last_ver);