]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: don't count deletions as ops
authorJosh Durgin <josh.durgin@dreamhost.com>
Thu, 9 Feb 2012 01:38:52 +0000 (17:38 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 9 Feb 2012 01:40:51 +0000 (17:40 -0800)
Counting them as ops but not requeueing the pg for recovery causes
backfill to stall when only deletions are sent in
recover_backfill(). Deletions are cheap and don't need to be acked, so
we can simply stop counting them as ops.

Fixes: #2044
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/osd/ReplicatedPG.cc

index 2dfb0a91631729ea70870126ddad81998fe5d9a0..145b444e329ed551227f5694efa54ca7dda46529 100644 (file)
@@ -5620,7 +5620,10 @@ int ReplicatedPG::recover_backfill(int max)
       dout(20) << " removing peer " << pbi.begin << dendl;
       to_remove[pbi.begin] = pbi.objects.begin()->second;
       pbi.pop_front();
-      ops++;
+      // Don't increment ops here because deletions
+      // are cheap and not replied to unlike real recovery_ops,
+      // and we can't increment ops without requeueing ourself
+      // for recovery.
     } else if (pbi.begin == backfill_info.begin) {
       if (pbi.objects.begin()->second !=
          backfill_info.objects.begin()->second) {