]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: do not start_recovery_op if we are already pushing
authorSamuel Just <sam.just@inktank.com>
Tue, 11 Sep 2012 18:05:40 +0000 (11:05 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 11 Sep 2012 20:37:03 +0000 (13:37 -0700)
Should fix bug #2761.

If we are already pushing soid, recovery_ops will only be decremented once for
all current pushes, so only increment recovery_ops if we are not currently
pushing it.

This bug causes us to leak a recovery op and get stuck in backfill.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc

index 3f37284e770680c222774f5d01f41590fc67c187..10e6bc79baf3f0d4f547feb1b660f6d5aa59e2fc 100644 (file)
@@ -6438,7 +6438,8 @@ void ReplicatedPG::push_backfill_object(hobject_t oid, eversion_t v, eversion_t
 
   backfills_in_flight.insert(oid);
 
-  start_recovery_op(oid);
+  if (!pushing.count(oid))
+    start_recovery_op(oid);
   ObjectContext *obc = get_object_context(oid, OLOC_BLANK, false);
   obc->ondisk_read_lock();
   push_to_replica(obc, oid, peer);