]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: clean up RGWShardedOmapCRManager on early return 11866/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 11 Oct 2016 19:23:16 +0000 (15:23 -0400)
committerLoic Dachary <ldachary@redhat.com>
Wed, 9 Nov 2016 14:29:51 +0000 (15:29 +0100)
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>
(cherry picked from commit 2c66e9b7fad4eec017cecc6bd6005522cc0fb264)

src/rgw/rgw_sync.cc

index 3d494efed65e139d08f37373c98889536fa64550..b69d329ac704f41c7e540588dcbb0179f2f1f3ca 100644 (file)
@@ -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());