From eb3606c370ba75dc724dadcbf64be96c756dd7dc Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 16 May 2022 23:26:48 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_data_sync.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 2794d80c2e4..ecc7a9596ae 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)); -- 2.39.5