Assign stale master status to standalone masters
When a standalone master server is detected, it should receive the stale status to prevent it from losing the master status if another server is started and allow_cluster_recovery is enabled.
This commit is contained in:
@ -1015,9 +1015,10 @@ void do_failover(MYSQL_MONITOR *handle, MXS_MONITOR_SERVERS *db)
|
|||||||
handle->warn_failover = false;
|
handle->warn_failover = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
server_clear_set_status(db->server, SERVER_SLAVE, SERVER_MASTER);
|
server_clear_set_status(db->server, SERVER_SLAVE, SERVER_MASTER | SERVER_STALE_STATUS);
|
||||||
monitor_set_pending_status(db, SERVER_MASTER);
|
monitor_set_pending_status(db, SERVER_MASTER | SERVER_STALE_STATUS);
|
||||||
monitor_clear_pending_status(db, SERVER_SLAVE);
|
monitor_clear_pending_status(db, SERVER_SLAVE);
|
||||||
|
handle->master = db;
|
||||||
}
|
}
|
||||||
else if (!handle->allow_cluster_recovery)
|
else if (!handle->allow_cluster_recovery)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user