diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 8fb6fac7e..bb95617d8 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -867,13 +867,17 @@ MaxScale will at startup load the users from the backend server, but if the authentication of a user fails, MaxScale assumes it is because a new user has been created and will thus refresh the users. By default, MaxScale will do that at most once per 30 seconds and with this configuration option -that can be changed. The minimum allowed value is 10 seconds. A negative +that can be changed. A value of 0 allows infinite refreshes and a negative value disables the refreshing entirelly. Note that using `maxadmin` it is possible to explicitly cause the users of a service to be reloaded. + ``` users_refresh_time=120 ``` +In MaxScale 2.3.9 and older versions, the minimum allowed value was 10 seconds +but, due to a bug, the default value was 0 which allowed infinite refreshes. + ### `retain_last_statements` How many statements MaxScale should store for each session. This is for diff --git a/include/maxscale/service.h b/include/maxscale/service.h index e3f030a2b..dea4624df 100644 --- a/include/maxscale/service.h +++ b/include/maxscale/service.h @@ -83,7 +83,6 @@ typedef struct server_ref_t /* Refresh rate limits for load users from database */ #define USERS_REFRESH_TIME_DEFAULT 30 /* Allowed time interval (in seconds) after last update*/ -#define USERS_REFRESH_TIME_MIN 10 /* Minimum allowed time interval (in seconds)*/ /** Default timeout values used by the connections which fetch user authentication data */ #define DEFAULT_AUTH_CONNECT_TIMEOUT 3 diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mxs922_base b/maxscale-system-test/cnf/maxscale.cnf.template.mxs922_base index 81b609976..cbb9d16ce 100644 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mxs922_base +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mxs922_base @@ -1,5 +1,6 @@ [maxscale] threads=###threads### +users_refresh_time=0 [rwsplit-service] type=service diff --git a/server/core/config.cc b/server/core/config.cc index 3ca07e3f6..e3d910317 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -2337,7 +2337,7 @@ static int handle_global_item(const char* name, const char* value) return 0; } - decltype(gateway.qc_cache_properties.max_size)max_size = int_value; + decltype(gateway.qc_cache_properties.max_size) max_size = int_value; if (max_size >= 0) { @@ -2515,15 +2515,6 @@ static int handle_global_item(const char* name, const char* value) // but I just don't beleave the uptime will be that long. users_refresh_time = INT32_MAX; } - else if (users_refresh_time < USERS_REFRESH_TIME_MIN) - { - MXS_WARNING("%s is less than the allowed minimum value of %d for the " - "configuration option '%s', using the minimum value.", - value, - USERS_REFRESH_TIME_MIN, - CN_USERS_REFRESH_TIME); - users_refresh_time = USERS_REFRESH_TIME_MIN; - } if (users_refresh_time > INT32_MAX) {