From: Samuel Just Date: Wed, 27 Nov 2013 03:17:59 +0000 (-0800) Subject: PG: don't query unfound on empty pgs X-Git-Tag: v0.67.8~32^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=41d5e9ab39e69c80bec1cb0627004c3fae6dc81d;p=ceph.git 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) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index e06ddbb0e343..2b4f4f20445f 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