]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix send_incremental ranges; behave when sending just 1 inc.
authorSage Weil <sage@newdream.net>
Thu, 9 Sep 2010 18:03:46 +0000 (11:03 -0700)
committerSage Weil <sage@newdream.net>
Thu, 9 Sep 2010 18:03:46 +0000 (11:03 -0700)
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

index 018369da4322d5e3293d180254af85e82fa8e73f..9d4eb408ae880dec9c8619142e7baa7261e0a08f 100644 (file)
@@ -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;
   }
 }