]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix build_incremental_map_msg 31236/head
authorSage Weil <sage@redhat.com>
Wed, 13 Feb 2019 21:01:48 +0000 (15:01 -0600)
committerDavid Zafman <dzafman@redhat.com>
Tue, 29 Oct 2019 16:37:03 +0000 (09:37 -0700)
We need to fall back to an old map if since (the peer's epoch) is *older*
than our oldest.  If it's newer, we have it, and can just send
incrementals.

Fixes: http://tracker.ceph.com/issues/38282
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 57a13adc8d0e34b4bb1a4022eacbb3de2636df53)

src/osd/OSD.cc

index f46aca8c032f65c9951cfc903c6200ced4baed8e..9be3c3392413bc6dbd633023e56c52007d4ce00e 100644 (file)
@@ -1269,11 +1269,11 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to,
   int max = cct->_conf->osd_map_message_max;
   ssize_t max_bytes = cct->_conf->osd_map_message_max_bytes;
 
-  if (since > m->oldest_map) {
+  if (since < m->oldest_map) {
     // we don't have the next map the target wants, so start with a
     // full map.
     bufferlist bl;
-    dout(10) << __func__ << " oldest map " << max_oldest_map << " < since "
+    dout(10) << __func__ << " oldest map " << max_oldest_map << " > since "
             << since << ", starting with full map" << dendl;
     since = m->oldest_map;
     if (!get_map_bl(since, bl)) {