From: Adam C. Emerson Date: Tue, 17 May 2022 03:26:48 +0000 (-0400) Subject: rgw: `RGWSyncBucketCR` reads remote info on non-`Incremental` state X-Git-Tag: v18.0.0~787^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb3606c370ba75dc724dadcbf64be96c756dd7dc;p=ceph.git rgw: `RGWSyncBucketCR` reads remote info on non-`Incremental` state This ensures that the remote bucket index log info is available for all cases where we're calling `InitBucketFullSyncStatusCR` Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 2794d80c2e4b..ecc7a9596ae8 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -5159,8 +5159,7 @@ int RGWSyncBucketCR::operate(const DoutPrefixProvider *dpp) tn->log(20, SSTR("sync status for source bucket: " << bucket_status.state << ". lease is: " << (bucket_lease_cr ? "taken" : "not taken") << ". stop indications is: " << bucket_stopped)); - if (bucket_status.state == BucketSyncState::Init || - bucket_status.state == BucketSyncState::Stopped || + if (bucket_status.state != BucketSyncState::Incremental || bucket_stopped) { // if state is Init or Stopped, we query the remote RGW for ther state yield call(new RGWReadRemoteBucketIndexLogInfoCR(sc, sync_pair.dest_bucket, &info));