diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 947be259ff6f6..b34e7fe689166 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -814,6 +814,7 @@ class RGWFetchAllMetaCR : public RGWCoroutine { } if (get_ret_status() < 0) { ldout(cct, 0) << "ERROR: failed to fetch metadata sections" << dendl; + yield entries_index->finish(); yield lease_cr->go_down(); drain_all(); return set_cr_error(get_ret_status()); @@ -829,6 +830,7 @@ class RGWFetchAllMetaCR : public RGWCoroutine { } if (get_ret_status() < 0) { ldout(cct, 0) << "ERROR: failed to fetch metadata section: " << *sections_iter << dendl; + yield entries_index->finish(); yield lease_cr->go_down(); drain_all(); return set_cr_error(get_ret_status());