Implement simple failover mode into mysqlmon
The mysqlmon simple failover mode allows it to direct write traffic to a secondary node. This enables a very simple failover mode with MaxScale when it is used in a two node master-slave setup.
This commit is contained in:
@ -50,6 +50,8 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#define MYSQLMON_DEFAULT_FAILCOUNT 5
|
||||
|
||||
/**
|
||||
* The handle for an instance of a MySQL Monitor module
|
||||
*/
|
||||
@ -72,6 +74,9 @@ typedef struct
|
||||
char* script; /*< Script to call when state changes occur on servers */
|
||||
bool events[MAX_MONITOR_EVENT]; /*< enabled events */
|
||||
HASHTABLE *server_info; /**< Contains server specific information */
|
||||
bool failover; /**< If simple failover is enabled */
|
||||
int failcount; /**< How many monitoring cycles servers must be
|
||||
down before failover is initiated */
|
||||
} MYSQL_MONITOR;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user