]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: build_incremental_map_msg: behave if we have latest full but not incremental
authorSage Weil <sage@redhat.com>
Fri, 15 Feb 2019 14:25:19 +0000 (08:25 -0600)
committerSage Weil <sage@redhat.com>
Fri, 15 Feb 2019 14:44:52 +0000 (08:44 -0600)
Fixes 47a3f63ef71522d6b9572e81674598dd3e19df9d and
follow-on 57a13adc8d0e34b4bb1a4022eacbb3de2636df53

Fixes: http://tracker.ceph.com/issues/38330
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 8550064567ec6dd8fa82dd646c90f5c68ab4b113..24741dc64455d674f53c76c270f3f3722200e9bc 100644 (file)
@@ -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;
 }