]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: skip unfound objects in recover_primary()
authorSage Weil <sage@newdream.net>
Mon, 15 Nov 2010 20:04:57 +0000 (12:04 -0800)
committerSage Weil <sage@newdream.net>
Mon, 15 Nov 2010 20:04:57 +0000 (12:04 -0800)
We also need to make sure we come back later when they are found.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ReplicatedPG.cc

index 09fc82fe6cea6d661392123a296b98185164b198..8d540f26dad461ec048fd54a1cdca10efc89710f 100644 (file)
@@ -3683,8 +3683,11 @@ int ReplicatedPG::recover_primary(int max)
     sobject_t head = soid;
     head.snap = CEPH_NOSNAP;
 
+    bool unfound = missing_loc.count(soid);
+
     dout(10) << "recover_primary "
              << soid << " " << item.need
+            << (unfound ? "":" (unfound)")
             << (missing.is_missing(soid) ? " (missing)":"")
             << (missing.is_missing(head) ? " (missing head)":"")
              << (pulling.count(soid) ? " (pulling)":"")
@@ -3694,6 +3697,8 @@ int ReplicatedPG::recover_primary(int max)
     if (!pulling.count(soid)) {
       if (pulling.count(head)) {
        ++skipped;
+      } else if (unfound) {
+       ++skipped;
       } else {
        // is this a clone operation that we can do locally?
        if (latest && latest->op == Log::Entry::CLONE) {