Allow rapid reloading of users on startup

This fixes the test failures that stem from users being created right
after maxscale has started. This also should make startups a bit smoother
now that the default value of users_refresh_time has been fixed.
This commit is contained in:
Markus Mäkelä 2019-07-08 11:31:09 +03:00
parent 1c96dc9769
commit e658dca4fe
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -1433,8 +1433,10 @@ bool Service::refresh_users()
MXS_CONFIG* config = config_get_global_options();
/* Check if refresh rate limit has been exceeded */
if (now < m_rate_limits[self].last + config->users_refresh_time)
/* Check if refresh rate limit has been exceeded. Also check whether we are in the middle of starting up.
* If so, allow repeated reloading of users. */
if (now > maxscale_started() + config->users_refresh_time
&& now < m_rate_limits[self].last + config->users_refresh_time)
{
if (!m_rate_limits[self].warned)
{