From: Casey Bodley Date: Thu, 12 Mar 2020 20:43:05 +0000 (-0400) Subject: rgw: clean up index after full data sync X-Git-Tag: v17.1.0~38^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be9c8bc96b57205ceafca6fd02e51f02128419c3;p=ceph.git rgw: clean up index after full data sync Fixes: https://tracker.ceph.com/issues/40177 Signed-off-by: Casey Bodley (cherry picked from commit dd6bf0b5a8e7087724d0d4debc88334978dffde7) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 19f8c2568b0b..1e988d4ce33f 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1626,6 +1626,12 @@ public: drain_all(); return set_cr_error(retcode); } + // clean up full sync index + yield { + const auto& pool = sync_env->svc->zone->get_zone_params().log_pool; + auto oid = full_data_sync_index_shard_oid(sc->source_zone.id, shard_id); + call(new RGWRadosRemoveCR(sync_env->store, {pool, oid})); + } // keep lease and transition to incremental_sync() } return 0;