]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: Update marker and objv after acquiring the lease
authorSoumya Koduri <skoduri@redhat.com>
Fri, 7 Oct 2022 18:32:44 +0000 (00:02 +0530)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 11 Jan 2023 05:13:59 +0000 (00:13 -0500)
In RGWDataSyncShardCR, after acquiring the lease, reread sync status
shard object to fetch the latest marker & objv stored.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
src/rgw/driver/rados/rgw_data_sync.cc

index cbbcf2cb3dd5d10bf0e19d06dee2d474292aaf81..699de69bc69d38e0ece485be04ceb10a7e321643 100644 (file)
@@ -2053,6 +2053,16 @@ public:
       }
       *reset_backoff = true;
       tn->log(10, "took lease");
+      /* Reread data sync status to fech latest marker and objv */
+      objv.clear();
+      yield call(new RGWSimpleRadosReadCR<rgw_data_sync_marker>(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
+                                                             rgw_raw_obj(pool, status_oid),
+                                                             &sync_marker, true, &objv));
+      if (retcode < 0) {
+        lease_cr->go_down();
+        drain_all();
+        return set_cr_error(retcode);
+      }
 
       while (true) {
        if (sync_marker.state == rgw_data_sync_marker::FullSync) {