]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fix 2 null versionID after convert_plain_entry_to_versioned 53400/head
authorRickyMaRui <140392518+RickyMaRui@users.noreply.github.com>
Fri, 28 Jul 2023 03:22:10 +0000 (11:22 +0800)
committerMykola Golub <mgolub@suse.com>
Mon, 11 Sep 2023 16:33:08 +0000 (19:33 +0300)
After convert plain entry to versioned, the converted entry epoch is 1.
Setting this ensures that there is only one null version.

Fixes: https://tracker.ceph.com/issues/62013
Signed-off-by: rui ma <marui1@chinatelecom.cn>
Signed-off-by: zhuo li <lizhuo@chinatelecom.cn>
(cherry picked from commit 14cfbfd60c45cc0f04f7a83057cb460731f3cc70)

src/cls/rgw/cls_rgw.cc

index 10068f4cdf4b8d2bd922fb039cf2e6b2bb14b789..2c0b3eedb46616f05fa6f2a85c5d72d4db07bcd1 100644 (file)
@@ -1776,6 +1776,9 @@ static int rgw_bucket_link_olh(cls_method_context_t hctx, bufferlist *in, buffer
       return ret;
     }
     olh.set_tag(op.olh_tag);
+    if (op.key.instance.empty()){
+      obj.set_epoch(1);
+    }
   }
 
   /* update the olh log */