]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: put source mon id in a temp variable
authorSage Weil <sage@redhat.com>
Wed, 13 Aug 2014 23:01:01 +0000 (16:01 -0700)
committerSage Weil <sage@redhat.com>
Thu, 16 Oct 2014 00:17:35 +0000 (17:17 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit bb046ed01ecf58b8c87eeeee2e00a476e6fba467)

src/mon/Paxos.cc

index 796d0c5cc1d5b01dd7231599ec6bc467243a5023..dec64c9871fc9187f7faab3b17d36526505065b3 100644 (file)
@@ -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();