]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: clean up index after full data sync
authorCasey Bodley <cbodley@redhat.com>
Thu, 12 Mar 2020 20:43:05 +0000 (16:43 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 17 Jan 2022 20:53:26 +0000 (15:53 -0500)
Fixes: https://tracker.ceph.com/issues/40177
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_data_sync.cc

index 19f8c2568b0ba4f3669d7d8a9195ced01b283328..1e988d4ce33f11ef97de7ec8ab19d0e9ca8d124b 100644 (file)
@@ -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;