]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: only try to bump max if leader
authorSage Weil <sage@inktank.com>
Fri, 15 Mar 2013 04:10:09 +0000 (21:10 -0700)
committerSage Weil <sage@inktank.com>
Fri, 15 Mar 2013 04:10:46 +0000 (21:10 -0700)
I broke this in 4637752db6f8520abba160b4817323379c4a7fe0 when I
restructured this function.  Only try to increase the max if we are
the leader.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/AuthMonitor.cc

index 5cf0e22e70feee52c209ddff948cd7d8014edfeb..998ee0801b21abc10b93bc9cceeeffe4aab84e34 100644 (file)
@@ -343,7 +343,7 @@ uint64_t AuthMonitor::assign_global_id(MAuth *m, bool should_increase_max)
   bool return_next = (next_global_id <= max_global_id);
 
   // bump the max?
-  while (next_global_id >= max_global_id) {
+  while (mon->is_leader() && next_global_id >= max_global_id) {
     increase_max_global_id();
   }