If variable mysql-monitor_replication_lag_group_by_host=false: (default)
Monitor will perform 1 replication lag check per server per hostgroup.
If variable mysql-monitor_replication_lag_group_by_host=true:
Monitor will perform 1 replication lag check per server.
This variable need to be set only in setups in which the same server is
configured in many hostgroups, thus reducing the number of checks
proxy_warning("Shunning server %s:%d from HG %u with replication lag of %d second, count number: '%d'\n",address,port,myhgc->hid,current_replication_lag,mysrvc->cur_replication_lag_count);
proxy_warning("Shunning server %s:%d from HG %u with replication lag of %d second, count number: '%d'\n",address,port,myhgc->hid,current_replication_lag,mysrvc->cur_replication_lag_count);
char*query=(char*)"SELECT hostgroup_id, hostname, port, max_replication_lag, use_ssl FROM mysql_servers WHERE max_replication_lag > 0 AND status NOT IN (2,3)";
query=(char*)"SELECT MIN(hostgroup_id), hostname, port, MIN(max_replication_lag), MAX(use_ssl) FROM mysql_servers WHERE max_replication_lag > 0 AND status NOT IN (2,3) GROUP BY hostname, port";
}else{
query=(char*)"SELECT hostgroup_id, hostname, port, max_replication_lag, use_ssl FROM mysql_servers WHERE max_replication_lag > 0 AND status NOT IN (2,3)";
}
t1=monotonic_time();
if(!GloMTH)returnNULL;// quick exit during shutdown/restart