From: Sage Weil Date: Wed, 13 Feb 2019 21:01:48 +0000 (-0600) Subject: osd: fix build_incremental_map_msg X-Git-Tag: v14.1.0~112^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57a13adc8d0e34b4bb1a4022eacbb3de2636df53;p=ceph.git osd: fix build_incremental_map_msg 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index abab3073b8eb..8550064567ec 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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)) {