From e861f03b943653a1b3f595d31e1f25a482a9482b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Feb 2019 08:25:19 -0600 Subject: [PATCH] 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 --- src/osd/OSD.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 8550064567e..24741dc6445 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1510,11 +1510,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; } -- 2.39.5