]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix bug with client id assignment of -1
authorSage Weil <sage@newdream.net>
Thu, 17 Sep 2009 22:57:06 +0000 (15:57 -0700)
committerSage Weil <sage@newdream.net>
Thu, 17 Sep 2009 22:57:06 +0000 (15:57 -0700)
src/mon/ClientMonitor.cc

index 689011b389c9df14a1ce766b73bda5d2dcd55985..a2f0d7ba04dbfab497f667a34ca3b74752565060 100644 (file)
@@ -63,7 +63,7 @@ bool ClientMonitor::update_from_paxos()
 
   paxos->stash_latest(paxosv, bl);
 
-  if (next_client < 0) {
+  if (next_client <= client_map.next_client) {
     dout(10) << "in-core next_client reset to " << client_map.next_client << dendl;
     next_client = client_map.next_client;
   }
@@ -73,8 +73,8 @@ bool ClientMonitor::update_from_paxos()
 
 void ClientMonitor::on_election_start()
 {
-  dout(10) << "in-core next_client cleared" << dendl;
-  next_client = -1;
+  dout(10) << "in-core next_client reset to " << client_map.next_client << dendl;
+  next_client = client_map.next_client;
 }
 
 void ClientMonitor::create_pending()