MXS-1661 Now only the time affects the reloading of users
Now the users will be reloaded at most once during each USERS_REFRESH_TIME period. Earlier they could be reloaded at at most USERS_REFRESH_MAX_PER_TIME times, which in practice meant that with repeated unauthorized login attempts they were reloaded N times in rapid succession, without the situation being likely to change in between.
This commit is contained in:
@ -71,7 +71,6 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int nloads; /*<< How many times have they been loaded. */
|
||||
time_t last; /*<< When was the users loaded the last time. */
|
||||
bool warned; /**< Has it been warned that the limit has been exceeded. */
|
||||
} SERVICE_REFRESH_RATE;
|
||||
@ -101,7 +100,6 @@ typedef struct server_ref_t
|
||||
|
||||
/* Refresh rate limits for load users from database */
|
||||
#define USERS_REFRESH_TIME 30 /* Allowed time interval (in seconds) after last update*/
|
||||
#define USERS_REFRESH_MAX_PER_TIME 4 /* Max number of load calls within the time interval */
|
||||
|
||||
/** Default timeout values used by the connections which fetch user authentication data */
|
||||
#define DEFAULT_AUTH_CONNECT_TIMEOUT 3
|
||||
|
Reference in New Issue
Block a user