MXS-1493: Improve master failure detection

The master failure can now be verified by checking when the slaves are
connected to the master. If the slaves do not receive any events from the
master, the connections are considered as down after a configurable limit.

Added two parameters for controlling whether the check is done and for how
long the monitor waits before doing the failover.
This commit is contained in:
Markus Mäkelä
2017-10-26 12:16:55 +03:00
parent 26b47d0b90
commit 0be39b8545
3 changed files with 78 additions and 0 deletions

View File

@ -71,6 +71,8 @@ typedef struct
uint32_t switchover_timeout; /**< Timeout in seconds for the master switchover */
char* replication_user; /**< Replication user for failover */
char* replication_password; /**< Replication password for failover*/
bool verify_master_failure; /**< Whether master failure is verified via slaves */
int master_failure_timeout; /**< Time in seconds to wait before doing failover */
MXS_MONITOR* monitor;
} MYSQL_MONITOR;