Check IO thread status when verifying master failure
When MaxScale thinks that the master has failed, it tries to verify it by seeing if the slave server is receiving events. There was a missing IO thread status check in the slave_receiving_events function which caused the failover to wait until the verification timed out. The relay master detection logic also lacked a check for the slave SQL thread status. The code should check the state of the SQL thread to determine whether the server is actually a functional slave to a master.
This commit is contained in:
@ -1521,6 +1521,7 @@ static bool slave_receiving_events(MYSQL_MONITOR* handle)
|
||||
MySqlServerInfo* info = get_server_info(handle, server);
|
||||
|
||||
if (info->slave_configured &&
|
||||
info->slave_status.slave_io_running &&
|
||||
info->slave_status.master_server_id == master_id &&
|
||||
difftime(time(NULL), info->latest_event) < handle->master_failure_timeout)
|
||||
{
|
||||
|
Reference in New Issue
Block a user