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>
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)"