user->kill_state = USER_KILL_STATE_NONE;
timeout_remove(&user->to_move);
+ i_assert(dir->users_moving_count > 0);
+ dir->users_moving_count--;
+
dir->state_change_callback(dir);
}
ctx->username_hash = username_hash;
ctx->self = src->self;
+ dir->users_moving_count++;
user->to_move = timeout_add(DIRECTOR_USER_MOVE_TIMEOUT_MSECS,
director_user_move_timeout, user);
user->kill_state = USER_KILL_STATE_KILLING;
struct mail_host_list *orig_config_hosts;
/* temporary user -> host associations */
struct user_directory *users;
+ /* Number of users currently being moved */
+ unsigned int users_moving_count;
/* these requests are waiting for directors to be in synced */
ARRAY(struct director_request *) pending_requests;
str = t_str_new(64);
str_printfa(str, "[%u users", user_directory_count(director->users));
+ if (director->users_moving_count > 0)
+ str_printfa(str, ", %u moving", director->users_moving_count);
str_printfa(str, ", %lu req/s",
(unsigned long)(director->num_requests - prev_requests));
str_printfa(str, ", %llu+%llu kB/s",