]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: when object is versioned and lc transition it, the object is becoming non... 32057/head
authorOr Friedmann <ofriedma@redhat.com>
Thu, 2 Jan 2020 09:51:00 +0000 (11:51 +0200)
committerNathan Cutler <ncutler@suse.com>
Fri, 24 Jan 2020 14:59:54 +0000 (15:59 +0100)
when object is versioned and lc transition it, the object is becoming non-current

Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Fixes: https://tracker.ceph.com/issues/43444
(cherry picked from commit 5f37ca283141df76a6f698ae4d7a23772b8b9e1b)

src/cls/rgw/cls_rgw.cc

index 0d0798b44a1ebbb039b1cf156de13e4f5afdaa72..96dbab343f6f12ef9fff2e657338a2d33e3f4bd2 100644 (file)
@@ -1502,7 +1502,7 @@ static int rgw_bucket_link_olh(cls_method_context_t hctx, bufferlist *in, buffer
   // current epoch and sorts after the current instance
   const bool promote = (olh.get_epoch() > prev_epoch) ||
       (olh.get_epoch() == prev_epoch &&
-       olh.get_entry().key.instance > op.key.instance);
+       olh.get_entry().key.instance >= op.key.instance);
 
   if (olh_found) {
     const string& olh_tag = olh.get_tag();