]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::pull: fix test for unfound
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 19 Nov 2010 22:21:00 +0000 (14:21 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 19 Nov 2010 22:21:00 +0000 (14:21 -0800)
The test for unfound objects was reversed, leading us to try to pull
unfound objects and refrain from pulling objects that we knew how to
get. Should fix bug #585.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/ReplicatedPG.cc

index 6036d8bd6c92cd9ab330b8f85bbd43df3d363738..61aa10e26376198ca739986b1510776b5af039e3 100644 (file)
@@ -3702,7 +3702,7 @@ int ReplicatedPG::recover_primary(int max)
     sobject_t head = soid;
     head.snap = CEPH_NOSNAP;
 
-    bool unfound = missing_loc.count(soid);
+    bool unfound = (missing_loc.find(soid) == missing_loc.end());
 
     dout(10) << "recover_primary "
              << soid << " " << item.need