From c72abc1088abfe5f357c41a3872e5cf337dc6808 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 25 Jun 2018 21:18:01 -0500 Subject: [PATCH] osd/PG: do not send notify to empty peer This is mostly paranoia to avoid doing something clearly silly if the add_source_info() implementation incorrectly decided we found something new (as it did in http://tracker.ceph.com/issues/24588). Signed-off-by: Sage Weil (cherry picked from commit 3407b39bf36cb5fa5b5bd91c25f571134b7b929b) --- src/osd/PG.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 43c0ec28865b..d4c783410db9 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -570,7 +570,12 @@ bool PG::search_for_missing( from, oinfo, omissing, ctx->handle); if (found_missing && num_unfound_before != missing_loc.num_unfound()) publish_stats_to_osd(); - if (found_missing) { + // avoid doing this if the peer is empty. This is abit of paranoia + // to avoid doing something rash if add_source_info() above + // incorrectly decided we found something new. (if the peer has + // last_update=0'0 that's impossible.) + if (found_missing && + oinfo.last_update != eversion_t()) { pg_info_t tinfo(oinfo); tinfo.pgid.shard = pg_whoami.shard; (*(ctx->info_map))[from.osd].push_back( -- 2.47.3