From: Shilpa Jagannath Date: Wed, 26 Apr 2023 10:56:51 +0000 (-0400) Subject: rgw/multisite: no need to enforce versioning on bucket during object sync on archive... X-Git-Tag: v19.0.0~1130^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e7a8d8415009873a531903a29f68a17787e70dd;p=ceph.git rgw/multisite: no need to enforce versioning on bucket during object sync on archive zone. versioning is enforced as part of bucket metadata sync aready Signed-off-by: Shilpa Jagannath --- diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index eca2bc95202..5e7f27c0526 100644 --- a/src/rgw/driver/rados/rgw_data_sync.cc +++ b/src/rgw/driver/rados/rgw_data_sync.cc @@ -3010,16 +3010,6 @@ RGWCoroutine *RGWArchiveDataSyncModule::sync_object(const DoutPrefixProvider *dp { auto sync_env = sc->env; ldout(sc->cct, 5) << "SYNC_ARCHIVE: sync_object: b=" << sync_pipe.info.source_bs.bucket << " k=" << key << " versioned_epoch=" << versioned_epoch.value_or(0) << dendl; - if (!sync_pipe.dest_bucket_info.versioned() || - (sync_pipe.dest_bucket_info.flags & BUCKET_VERSIONS_SUSPENDED)) { - ldout(sc->cct, 0) << "SYNC_ARCHIVE: sync_object: enabling object versioning for archive bucket" << dendl; - sync_pipe.dest_bucket_info.flags = (sync_pipe.dest_bucket_info.flags & ~BUCKET_VERSIONS_SUSPENDED) | BUCKET_VERSIONED; - int op_ret = sync_env->driver->getRados()->put_bucket_instance_info(sync_pipe.dest_bucket_info, false, real_time(), NULL, sync_env->dpp, null_yield); - if (op_ret < 0) { - ldpp_dout(sync_env->dpp, 0) << "SYNC_ARCHIVE: sync_object: error versioning archive bucket" << dendl; - return NULL; - } - } std::optional dest_key;