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

View File

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