From 6cefd5f1e3c2d73dcce20189b226a917407f05d1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 9 Sep 2010 11:03:46 -0700 Subject: [PATCH] mon: fix send_incremental ranges; behave when sending just 1 inc. The build_incremental range is inclusive. And we should behave when sending a single inc map to get up to date. --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 018369da4322d..9d4eb408ae880 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -785,11 +785,11 @@ void OSDMonitor::send_incremental(epoch_t from, entity_inst_t& dest) { dout(5) << "send_incremental from " << from << " -> " << osdmap.get_epoch() << " to " << dest << dendl; - while (from < osdmap.get_epoch()) { + while (from <= osdmap.get_epoch()) { epoch_t to = MIN(from + 100, osdmap.get_epoch()); MOSDMap *m = build_incremental(from, to); mon->messenger->send_message(m, dest); - from = to; + from = to + 1; } } -- 2.39.5