Skip to content

Commit

Permalink
rgw: clean up RGWShardedOmapCRManager on early return
Browse files Browse the repository at this point in the history
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 <cbodley@redhat.com>
  • Loading branch information
cbodley committed Oct 14, 2016
1 parent cfcfe96 commit 2c66e9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rgw/rgw_sync.cc
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit 2c66e9b

Please sign in to comment.