]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: immediately propose after 'osd setmap'
authorSage Weil <sage@newdream.net>
Mon, 15 Dec 2008 21:44:52 +0000 (13:44 -0800)
committerSage Weil <sage@newdream.net>
Mon, 15 Dec 2008 21:44:52 +0000 (13:44 -0800)
Any subsequent osdmap changes will be ignored anyway.

Note that this still throws out changes _prior_ to the setmap.  In
theory, that shouldn't matter, since we're replacing the map
anyway.

src/mon/OSDMonitor.cc

index 5771c4f71757a6f7aa5e489a509cdabbf63826e7..00251d361cdd2fd0454fc449563126d626242043 100644 (file)
@@ -313,6 +313,10 @@ bool OSDMonitor::should_propose(double& delay)
 {
   dout(10) << "should_propose" << dendl;
 
+  // if full map, propose immediately!  any subsequent changes will be clobbered.
+  if (pending_inc.fullmap.length())
+    return true;
+
   // adjust osd weights?
   if (osd_weight.size() == (unsigned)osdmap.get_max_osd()) {
     dout(0) << " adjusting osd weights based on " << osd_weight << dendl;