Make MySQL monitor crash-safe
The MySQL monitor stores the server states in a backup file which can be used to restore the state of the servers even if MaxScale is stoppen in an uncontrolled fashion.
This commit is contained in:
@ -79,8 +79,30 @@ typedef struct
|
||||
down before failover is initiated */
|
||||
bool allow_cluster_recovery; /**< Allow failed servers to rejoin the cluster */
|
||||
bool warn_failover; /**< Log a warning when failover happens */
|
||||
bool load_backup; /**< Whether backup file should be loaded */
|
||||
} MYSQL_MONITOR;
|
||||
|
||||
/**
|
||||
* @brief Store a backup of server states
|
||||
*
|
||||
* @param monitor Monitor to backup
|
||||
*/
|
||||
void store_server_backup(MXS_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* @brief Load a backup of server states
|
||||
*
|
||||
* @param monitor Monitor where backup is loaded
|
||||
*/
|
||||
void load_server_backup(MXS_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* @brief Remove stored backup file
|
||||
*
|
||||
* @param monitor Monitor whose backup is removed
|
||||
*/
|
||||
void remove_server_backup(MXS_MONITOR *monitor);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user