From: Zengran Zhang Date: Thu, 11 Apr 2019 07:07:08 +0000 (+0800) Subject: osd/PG: the warning seems more serious than what it wanna transmit X-Git-Tag: v15.1.0~2895^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7e0b17a74979a1d71f3fc63279fbe6254ba6dcdb;p=ceph.git osd/PG: the warning seems more serious than what it wanna transmit The missing items is picked from primary and peers, so it is normal if some guys missing the same version, assertion on the next line will check wrong circumstances. Signed-off-by: Zengran Zhang --- diff --git a/src/osd/PG.h b/src/osd/PG.h index a8d9d745fc6f..fd37b4e456ef 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -826,10 +826,13 @@ protected: if (j == needs_recovery_map.end()) { needs_recovery_map.insert(*i); } else { - lgeneric_dout(pg->cct, 0) << this << " " << pg->info.pgid << " unexpected need for " - << i->first << " have " << j->second - << " tried to add " << i->second << dendl; - ceph_assert(i->second.need == j->second.need); + if (i->second.need != j->second.need) { + lgeneric_dout(pg->cct, 0) << this << " " << pg->info.pgid << " unexpected need for " + << i->first << " have " << j->second + << " tried to add " << i->second << dendl; + ceph_assert(0 == "unexpected need for missing item"); + + } } } }