From 3d2f89fac29ac06d5fc76f6ee1a3fa667c773ca1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 6 Oct 2011 16:10:10 -0700 Subject: [PATCH] mon: make other send_incremental variant handle map discontinuity Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index a25235bae9d12..7dc7d1bd433bd 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -943,6 +943,18 @@ void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t first) { dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]" << " to " << req->get_orig_source_inst() << dendl; + if (first < paxos->get_first_committed()) { + first = paxos->get_first_committed(); + bufferlist bl; + mon->store->get_bl_sn(bl, "osdmap_full", first); + dout(20) << "send_incremental starting with base full " << first << " " << bl.length() << " bytes" << dendl; + MOSDMap *m = new MOSDMap(osdmap.get_fsid()); + m->oldest_map = paxos->get_first_committed(); + m->newest_map = osdmap.get_epoch(); + m->maps[first] = bl; + mon->send_reply(req, m); + return; + } MOSDMap *m = build_incremental(first, osdmap.get_epoch()); m->oldest_map = paxos->get_first_committed(); m->newest_map = osdmap.get_epoch(); -- 2.39.5