MXS-1661 Introduce 'users_refresh_time'

It is now possible to explicitly specify how frequently MaxScale
may refresh the users of a service.
This commit is contained in:
Johan Wikman
2018-02-09 11:40:17 +02:00
parent ae160f3ff2
commit b4760c5bbe
6 changed files with 80 additions and 6 deletions

View File

@ -78,6 +78,7 @@ typedef struct
int query_retries; /**< Number of times a interrupted query is retried */
time_t query_retry_timeout; /**< Timeout for query retries */
char* local_address; /**< Local address to use when connecting */
time_t users_refresh_time; /**< How often the users can be refreshed */
} MXS_CONFIG;
/**

View File

@ -99,7 +99,8 @@ typedef struct server_ref_t
#define SERVICE_PARAM_UNINIT -1
/* Refresh rate limits for load users from database */
#define USERS_REFRESH_TIME 30 /* Allowed time interval (in seconds) after last update*/
#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