MXS-1446: Move failover to mysqlmon
Split the state change processing and failover handling into two separate functions and added a call to the failover function into mysqlmon. This prevents unintended behavior when failover is enabled for non-mysqlmon monitors. The parameter itself still needs to be moved into mysqlmon. Moved the failover documentation to the mysqlmon documentation as it is specific to this monitor.
This commit is contained in:
@ -289,6 +289,22 @@ void release_monitor_servers(MXS_MONITOR *monitor);
|
||||
*/
|
||||
void mon_process_state_changes(MXS_MONITOR *monitor, const char *script, uint64_t events);
|
||||
|
||||
/**
|
||||
* @brief Process possible failover event
|
||||
*
|
||||
* If a master failure has occurred and MaxScale is configured with failover
|
||||
* functionality, this fuction executes an external failover program to elect
|
||||
* a new master server.
|
||||
*
|
||||
* This function should be called immediately after @c mon_process_state_changes.
|
||||
*
|
||||
* @param monitor Monitor whose cluster is processed
|
||||
*
|
||||
* @todo Currently this only works with flat replication topologies and
|
||||
* needs to be moved inside mysqlmon as it is MariaDB specific code.
|
||||
*/
|
||||
void mon_process_failover(MXS_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* @brief Hangup connections to failed servers
|
||||
*
|
||||
|
Reference in New Issue
Block a user