From 41d5e9ab39e69c80bec1cb0627004c3fae6dc81d Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 26 Nov 2013 19:17:59 -0800 Subject: [PATCH] PG: don't query unfound on empty pgs When the replica responds, it responds with a notify rather than a log, which the primary then ignores since it is already in the peer_info map. Rather than fix that we'll simply not send queries to peers we already know to have no unfound objects. Fixes: #6910 Signed-off-by: Samuel Just Reviewed-by: Sage Weil Reviewed-by: David Zafman (cherry picked from commit 838b6c8387087543ce50837277f7f6b52ae87d00) --- src/osd/PG.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index e06ddbb0e34..2b4f4f20445 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -441,6 +441,13 @@ void PG::discover_all_missing(map< int, map > &query_map) continue; } + map::const_iterator iter = peer_info.find(peer); + if (iter != peer_info.end() && + (iter->second.is_empty() || iter->second.dne())) { + // ignore empty peers + continue; + } + // If we've requested any of this stuff, the pg_missing_t information // should be on its way. // TODO: coalsce requested_* into a single data structure @@ -673,6 +680,10 @@ bool PG::all_unfound_are_queried_or_lost(const OSDMapRef osdmap) const for (; peer != mend; ++peer) { if (peer_missing.count(*peer)) continue; + map::const_iterator iter = peer_info.find(*peer); + if (iter != peer_info.end() && + (iter->second.is_empty() || iter->second.dne())) + continue; const osd_info_t &osd_info(osdmap->get_info(*peer)); if (osd_info.lost_at <= osd_info.up_from) { // If there is even one OSD in might_have_unfound that isn't lost, we -- 2.47.3