From: Sage Weil Date: Wed, 13 Aug 2014 23:01:01 +0000 (-0700) Subject: mon/Paxos: put source mon id in a temp variable X-Git-Tag: v0.80.8~32^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11d2c9dd4aeb835ca73bfb41fb15b1038547adf6;p=ceph.git mon/Paxos: put source mon id in a temp variable Signed-off-by: Sage Weil (cherry picked from commit bb046ed01ecf58b8c87eeeee2e00a476e6fba467) --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 796d0c5cc1d5..dec64c9871fc 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -449,6 +449,7 @@ void Paxos::_sanity_check_store() void Paxos::handle_last(MMonPaxos *last) { bool need_refresh = false; + int from = last->get_source().num(); dout(10) << "handle_last " << *last << dendl; @@ -460,12 +461,13 @@ void Paxos::handle_last(MMonPaxos *last) // note peer's first_ and last_committed, in case we learn a new // commit and need to push it to them. - peer_first_committed[last->get_source().num()] = last->first_committed; - peer_last_committed[last->get_source().num()] = last->last_committed; + peer_first_committed[from] = last->first_committed; + peer_last_committed[from] = last->last_committed; if (last->first_committed > last_committed+1) { dout(5) << __func__ - << " peon's lowest version is too high for our last committed" + << " mon." << from + << " lowest version is too high for our last committed" << " (theirs: " << last->first_committed << "; ours: " << last_committed << ") -- bootstrap!" << dendl; last->put();