]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: increase max_global_id before we hit the wall
authorSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 20:13:12 +0000 (13:13 -0700)
committerSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 22:39:29 +0000 (15:39 -0700)
Bump the max before we run out of IDs to allocate.  This avoids a stall in
authentication every N new clients.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
src/mon/AuthMonitor.cc

index 5cf0e22e70feee52c209ddff948cd7d8014edfeb..2052f11e04d077b17eed9d2122e9b2d24a6ec4d7 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 (next_global_id >= max_global_id - g_conf->mon_globalid_prealloc / 2) {
     increase_max_global_id();
   }