]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix build_incremental_map_msg 26413/head
authorSage Weil <sage@redhat.com>
Wed, 13 Feb 2019 21:01:48 +0000 (15:01 -0600)
committerSage Weil <sage@redhat.com>
Wed, 13 Feb 2019 21:11:07 +0000 (15:11 -0600)
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>
src/osd/OSD.cc

index abab3073b8ebac2c182ede2994e65bd2f234f494..8550064567ec6dd8fa82dd646c90f5c68ab4b113 100644 (file)
@@ -1472,11 +1472,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)) {