From: Sage Weil Date: Fri, 15 Feb 2019 14:25:19 +0000 (-0600) Subject: osd: build_incremental_map_msg: behave if we have latest full but not incremental X-Git-Tag: v13.2.8~3^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=49f0a1b9f5f0d41553766cc0a01dbbbed8fd7a12;p=ceph.git osd: build_incremental_map_msg: behave if we have latest full but not incremental Fixes 47a3f63ef71522d6b9572e81674598dd3e19df9d and follow-on 57a13adc8d0e34b4bb1a4022eacbb3de2636df53 Fixes: http://tracker.ceph.com/issues/38330 Signed-off-by: Sage Weil (cherry picked from commit e861f03b943653a1b3f595d31e1f25a482a9482b) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index a421c9b50b0..52211fb0977 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1323,11 +1323,17 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to, } // send something bufferlist bl; - if (!get_inc_map_bl(m->newest_map, bl)) { + if (get_inc_map_bl(m->newest_map, bl)) { + m->incremental_maps[m->newest_map].claim(bl); + } else { derr << __func__ << " unable to load latest map " << m->newest_map << dendl; - ceph_abort(); + if (!get_map_bl(m->newest_map, bl)) { + derr << __func__ << " unable to load latest full map " << m->newest_map + << dendl; + ceph_abort(); + } + m->maps[m->newest_map].claim(bl); } - m->incremental_maps[m->newest_map].claim(bl); return m; }