From 208b837159617af04b93b9202923af36150ae4e6 Mon Sep 17 00:00:00 2001 From: RickyMaRui <140392518+RickyMaRui@users.noreply.github.com> Date: Fri, 28 Jul 2023 11:22:10 +0800 Subject: [PATCH] fix 2 null versionID after convert_plain_entry_to_versioned 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 Signed-off-by: zhuo li (cherry picked from commit 14cfbfd60c45cc0f04f7a83057cb460731f3cc70) --- src/cls/rgw/cls_rgw.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index f88a85e8d9e6..67e213894564 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -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 */ -- 2.47.3