]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: set init_check_compat when bucket sync status doesn't exist
authorCasey Bodley <cbodley@redhat.com>
Wed, 29 Mar 2023 14:57:04 +0000 (10:57 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 29 Mar 2023 14:57:04 +0000 (10:57 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_data_sync.cc

index fd2ac091dabb6523cc2164f1b08a7b98802ffa75..b4c52614f7e4bfc4fc9fbf55819fc00cb7731fab 100644 (file)
@@ -5692,6 +5692,12 @@ int RGWSyncBucketCR::operate(const DoutPrefixProvider *dpp)
     yield call(new ReadCR(dpp, env->driver,
                           status_obj, &bucket_status, false, &objv));
     if (retcode == -ENOENT) {
+      // if the full sync status object didn't exist yet, run the backward
+      // compatability logic in InitBucketFullSyncStatusCR below. if it did
+      // exist, a `bucket sync init` probably requested its re-initialization,
+      // and shouldn't try to resume incremental sync
+      init_check_compat = true;
+
       // use exclusive create to set state=Init
       objv.generate_new_write_ver(cct);
       yield call(new WriteCR(dpp, env->driver, status_obj, bucket_status, &objv, true));