From: Casey Bodley Date: Tue, 11 Oct 2016 19:23:16 +0000 (-0400) Subject: rgw: clean up RGWShardedOmapCRManager on early return X-Git-Tag: v10.2.6~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0b7577e521d1ef92d0e1c1ad4fb24df1e4e0279e;p=ceph.git rgw: clean up RGWShardedOmapCRManager on early return ShardedOmapCRManager is spawning coroutines that sleep. if we don't finish them before trying to drain_all(), they'll lead to deadlock Fixes: http://tracker.ceph.com/issues/17571 Signed-off-by: Casey Bodley (cherry picked from commit 2c66e9b7fad4eec017cecc6bd6005522cc0fb264) --- diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 3d494efed65e1..b69d329ac704f 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -812,6 +812,7 @@ public: } 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()); @@ -827,6 +828,7 @@ public: } 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());