Pre-load users for all threads

Pre-loading users for all threads at startup significantly reduces the
chance for failures caused by the lazy initialization of the user database
done by the authenticators.

If users are not loaded at startup and the connection limit for all
servers is reached, authentication in MaxScale will fail not due to too
many connections but due to the lack of authentication data. This causes
repeated reloading of users, which floods the log with messages, and
unnecessary stress on the cluster itself.
This commit is contained in:
Markus Mäkelä
2017-12-22 09:29:44 +02:00
parent ad57de6784
commit fb1875c61c
3 changed files with 29 additions and 3 deletions

View File

@ -69,6 +69,15 @@ void service_destroy_instances(void);
*/
int service_launch_all(void);
/**
* Perform thread-specific initialization
*
* Currently this function only pre-loads users for all threads.
*
* @return True on success, false on error (currently always returns true).
*/
bool service_thread_init();
/**
* Creating and adding new components to services
*/