]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: do not send notify to empty peer 22862/head
authorSage Weil <sage@redhat.com>
Tue, 26 Jun 2018 02:18:01 +0000 (21:18 -0500)
committerNathan Cutler <ncutler@suse.com>
Thu, 5 Jul 2018 06:43:22 +0000 (08:43 +0200)
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 <sage@redhat.com>
(cherry picked from commit 3407b39bf36cb5fa5b5bd91c25f571134b7b929b)

Conflicts:
src/osd/PG.cc (luminous does not have c1fbf350bcafab0ad94306302217eb39a66814b7)

src/osd/PG.cc

index 3a40b256639f0462d020a6b778149226aa0ae5ff..ddb89237aa9bb666b4efd65c3a3eacf9bec0c71c 100644 (file)
@@ -556,9 +556,14 @@ bool PG::search_for_missing(
     from, oinfo, omissing, ctx->handle);
   if (found_missing && num_unfound_before != missing_loc.num_unfound())
     publish_stats_to_osd();
+  // 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 &&
       (get_osdmap()->get_features(CEPH_ENTITY_TYPE_OSD, NULL) &
-       CEPH_FEATURE_OSD_ERASURE_CODES)) {
+       CEPH_FEATURE_OSD_ERASURE_CODES) &&
+      oinfo.last_update != eversion_t()) {
     pg_info_t tinfo(oinfo);
     tinfo.pgid.shard = pg_whoami.shard;
     (*(ctx->info_map))[from.osd].push_back(