Add parameter backend_connect_attempts to monitor

This number (defaults to 1) sets how many times mon_connect_to_db
will try to connect to a backend before returning an error. Every
connection attempt may take backend_connect_timeout seconds to
complete.

Also refactored code a bit. Renamed mon_connect_to_db to
mon_ping_or_connect_to_db, since it does not connect if the connection
is already alive.
This commit is contained in:
Esa Korhonen
2017-03-29 17:59:02 +03:00
parent 657d79470c
commit a362bd0024
11 changed files with 108 additions and 76 deletions

View File

@ -301,4 +301,6 @@ void config_disable_feedback_task(void);
*/
bool config_reload(void);
static const char BACKEND_CONNECT_ATTEMPTS[] = "backend_connect_attempts";
MXS_END_DECLS