From 2b792c50773afaf04c7ad7177a736e7f1e2d5a98 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Mon, 23 Oct 2017 20:20:44 -0700 Subject: [PATCH] osd: Handle objects on non-actingbackfill nodes during recovery 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 --- src/osd/PG.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a7cef006b0fd0..af4045efbb1ee 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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> backfill_target_objects; -- 2.39.5