Fix assignment of master status on failed servers
When the real root master server went down, it still received the master status bit due to how the replication tree was built. The bit should only be set for servers that are running. Also fixed a false state change event when the master status bit was manually cleared from the downed root master server.
This commit is contained in:
@ -1777,8 +1777,11 @@ static MXS_MONITOR_SERVERS *get_replication_tree(MXS_MONITOR *mon, int num_serve
|
||||
master->server->unique_name);
|
||||
ss_dassert(info);
|
||||
|
||||
/** Only set the Master status if read_only is disabled */
|
||||
monitor_set_pending_status(master, info->read_only ? SERVER_SLAVE : SERVER_MASTER);
|
||||
if (SERVER_IS_RUNNING(master->server))
|
||||
{
|
||||
/** Only set the Master status if read_only is disabled */
|
||||
monitor_set_pending_status(master, info->read_only ? SERVER_SLAVE : SERVER_MASTER);
|
||||
}
|
||||
|
||||
handle->master = master;
|
||||
}
|
||||
|
Reference in New Issue
Block a user