]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: be more careful about making sure we're up-to-date on sync check
authorGreg Farnum <greg@inktank.com>
Wed, 24 Apr 2013 22:27:23 +0000 (15:27 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 24 Apr 2013 22:40:13 +0000 (15:40 -0700)
We were looking at our own paxos_max_join_drift and using that to
calculate whether we were new enough to join without syncing, but
if those numbers don't match across monitors they might have trimmed. Use
the number they provide us as their first version and compare to that
as well.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/mon/Monitor.cc

index 2338e9320ead3f99f33b78bca89a9439711d1cbc..1ffe04b34bfb5523e4fc375a65109420be7910f4 100644 (file)
@@ -1900,7 +1900,9 @@ void Monitor::handle_probe_reply(MMonProbe *m)
   if (m->quorum.size()) {
     dout(10) << " existing quorum " << m->quorum << dendl;
 
-    if (paxos->get_version() + g_conf->paxos_max_join_drift < m->paxos_last_version) {
+    if ((paxos->get_version() + g_conf->paxos_max_join_drift <
+       m->paxos_last_version) ||
+       (paxos->get_version() < m->paxos_first_version)){
       dout(10) << " peer paxos version " << m->paxos_last_version
               << " vs my version " << paxos->get_version()
               << " (too far ahead)"