]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Handle objects on non-actingbackfill nodes during recovery 18297/head
authorDavid Zafman <dzafman@redhat.com>
Tue, 24 Oct 2017 03:20:44 +0000 (20:20 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 24 Oct 2017 03:20:44 +0000 (20:20 -0700)
With this fix we can see more misplaced and no degraded when
doing recovery to a new up/acting set with node(s) containing
objects that are not longer part of up/acting.

Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PG.cc

index a7cef006b0fd08789b75d763ebe4ec0cd1ba9ca4..af4045efbb1ee1bdfcab7db0556b35058c65bc43 100644 (file)
@@ -2635,6 +2635,17 @@ void PG::_update_calc_stats()
       }
     }
 
+    // Add recovery objects not part of actingbackfill to be used to reduce
+    // degraded and account as misplaced.
+    for (auto i = peer_info.begin() ; i != peer_info.end() ; ++i) {
+      if (actingbackfill.find(i->first) == actingbackfill.end())
+       object_copies += i->second.stats.stats.sum.num_objects;
+       misplaced += i->second.stats.stats.sum.num_objects;
+       ++num_misplaced;
+    }
+    if (object_copies)
+      dout(20) << __func__ << " objects not part of up/acting " << object_copies << dendl;
+
     // Objects backfilled, sorted by # objects.
     set<pair<int64_t,pg_shard_t>> backfill_target_objects;