diff --git a/Documentation/Monitors/MySQL-Monitor.md b/Documentation/Monitors/MySQL-Monitor.md index 30490924b..c9ca7137b 100644 --- a/Documentation/Monitors/MySQL-Monitor.md +++ b/Documentation/Monitors/MySQL-Monitor.md @@ -200,6 +200,24 @@ external agent that automatically reintegrates failed servers into the cluster. One of these agents is the _replication-manager_ which automatically configures the failed servers as new slaves of the current master. +## MySQL Monitor Crash Safety + +Starting with MaxScale 2.2.0, the mysqlmon module keeps an on-disk journal of +the latest server states. This change makes the monitor crash-safe when options +that introduce states are used. It also allows the monitor to retain stateful +information when MaxScale is restarted. + +Options that introduce states into the monitoring process are the +`detect_stale_master` and `detect_stale_slave` options, both of which are +enabled by default. + +The default location for the server state journal is in +`/var/lib/maxscale//mysqlmon.dat` where `` is the +name of the monitor section in the configuration file. If MaxScale crashes or is +shut down in an uncontrolled fashion, the journal will be read when MaxScale is +started. To skip the recovery process, manually delete the journal file before +starting MaxScale. + ## Example 1 - Monitor script Here is an example shell script which sends an email to an admin when a server goes down. diff --git a/Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md index d514b55a4..f8e50bcfb 100644 --- a/Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md @@ -35,6 +35,14 @@ The commands can be issued, but have no effect. ## New Features +### MySQL Monitor Crash Safety + +The MySQL monitor keeps a journal of the state of the servers and the currently +elected master. This information will be read if MaxScale suffers an +uncontrolled shutdown. By doing the journaling of server states, the mysqlmon +monitor is able to keep track of stale master and stale slave states across +restarts and crashes. + ### Avrorouter `deflate` compression The Avrorouter now supports the `deflate` compression method. This allows the