From 1e6eb157bcb368436eb67fe1c847594c9116912e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 13 Feb 2019 15:01:48 -0600 Subject: [PATCH] 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 (cherry picked from commit 57a13adc8d0e34b4bb1a4022eacbb3de2636df53) --- src/osd/OSD.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f46aca8c032..9be3c339241 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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)) { -- 2.47.3