Assign master status immediately to the replacement master
As the failover status check is done after the pending status has been moved to the current status, the do_failover should set the current status of the server as Master.
This commit is contained in:
@ -1100,11 +1100,13 @@ void do_failover(MYSQL_MONITOR *handle, MONITOR_SERVERS *db)
|
||||
db->server->unique_name);
|
||||
}
|
||||
|
||||
server_clear_set_status(db->server, SERVER_SLAVE, SERVER_MASTER);
|
||||
monitor_set_pending_status(db, SERVER_MASTER);
|
||||
monitor_clear_pending_status(db, SERVER_SLAVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
server_set_status(db->server, SERVER_MAINT);
|
||||
monitor_set_pending_status(db, SERVER_MAINT);
|
||||
}
|
||||
db = db->next;
|
||||
|
Reference in New Issue
Block a user