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.85~29^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb046ed01ecf58b8c87eeeee2e00a476e6fba467;p=ceph.git mon/Paxos: put source mon id in a temp variable Signed-off-by: Sage Weil --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 3883a3290d14..90dcde04ed84 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -385,6 +385,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; @@ -396,12 +397,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();