MXS-1845 Add demotion code

The master demotion in switchover now uses query retrying with
the switchover time limit.
This commit is contained in:
Esa Korhonen
2018-10-02 11:08:12 +03:00
parent a438a6df34
commit 49e85d9a28
3 changed files with 125 additions and 10 deletions

View File

@ -509,7 +509,15 @@ public:
* @param op Cluster operation descriptor
* @return True if successful
*/
bool promote(ClusterOperation& operation);
bool promote(ClusterOperation& op);
/**
* Demote this server. Removes all slave connections. If server was master, sets read_only.
*
* @param op Cluster operation descriptor
* @return True if successful
*/
bool demote(ClusterOperation& op);
/**
* Redirect the slave connection going to demotion target to replicate from promotion target.