MXS-1679 Check for existence of master before continuing failover checks
Seems to fix the issue with MaxScale detecting an old master down event.
This commit is contained in:
		@ -3330,12 +3330,14 @@ void check_maxscale_schema_replication(MXS_MONITOR *monitor)
 | 
			
		||||
bool mon_process_failover(MYSQL_MONITOR* monitor, uint32_t failover_timeout, bool* cluster_modified_out)
 | 
			
		||||
{
 | 
			
		||||
    ss_dassert(*cluster_modified_out == false);
 | 
			
		||||
    if (config_get_global_options()->passive ||
 | 
			
		||||
        (monitor->master && SERVER_IS_MASTER(monitor->master->server)))
 | 
			
		||||
    {
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
    bool rval = true;
 | 
			
		||||
    MXS_CONFIG* cnf = config_get_global_options();
 | 
			
		||||
    MXS_MONITORED_SERVER* failed_master = NULL;
 | 
			
		||||
 | 
			
		||||
    if (!cnf->passive)
 | 
			
		||||
    {
 | 
			
		||||
    for (MXS_MONITORED_SERVER *ptr = monitor->monitor->monitored_servers; ptr; ptr = ptr->next)
 | 
			
		||||
    {
 | 
			
		||||
        if (ptr->new_event && ptr->server->last_event == MASTER_DOWN_EVENT)
 | 
			
		||||
@ -3375,7 +3377,6 @@ bool mon_process_failover(MYSQL_MONITOR* monitor, uint32_t failover_timeout, boo
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (failed_master)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user