Redirect slaves of promotion target

This affects situations where the promoted server is a relay or multimaster
group member.
This commit is contained in:
Esa Korhonen
2018-10-11 11:35:53 +03:00
parent 20af9afb49
commit 0cf8ea43f7
4 changed files with 45 additions and 31 deletions

View File

@ -368,12 +368,15 @@ public:
bool demote(ClusterOperation& op);
/**
* Redirect the slave connection going to demotion target to replicate from promotion target.
* Redirect the slave connection going to old master to replicate from new master.
*
* @param op Operation descriptor
* @param old_master The connection to this server is redirected
* @param new_master The new master for the redirected connection
* @return True on success
*/
bool redirect_existing_slave_conn(ClusterOperation& op);
bool redirect_existing_slave_conn(ClusterOperation& op, const MariaDBServer* old_master,
const MariaDBServer* new_master);
/**
* Copy slave connections to this server. This is usually needed during switchover promotion and on