Skip to content

Commit d89b112

Browse files
authored
Merge pull request #166 from github/meiji163/debug
Set IgnoreHostsThreshold in ClusterProbe
2 parents e92dc89 + 2114df5 commit d89b112

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

pkg/mysql/mysql_http_check.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func MySQLHttpCheckHashKey(clusterName string, key *InstanceKey) string {
4040
}
4141

4242
func CheckHttp(clusterName string, probe *Probe) (httpCheckResult *MySQLHttpCheck) {
43-
4443
if probe.HttpCheckPort <= 0 {
4544
go func() { metrics.GetOrRegisterCounter("httpcheck.skip", nil).Inc(1) }()
4645
return NewMySQLHttpCheck(clusterName, &probe.Key, http.StatusOK)

pkg/throttle/throttler.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,10 @@ func (throttler *Throttler) refreshMySQLInventory() error {
365365
}
366366
log.Debugf("Read %+v hosts from ProxySQL %s, hostgroup id: %d (%s)", len(servers), dsn, clusterSettings.ProxySQLSettings.HostgroupID, clusterName)
367367
clusterProbes := &mysql.ClusterProbes{
368-
ClusterName: clusterName,
369-
IgnoreHostsCount: clusterSettings.IgnoreHostsCount,
370-
InstanceProbes: mysql.NewProbes(),
368+
ClusterName: clusterName,
369+
IgnoreHostsCount: clusterSettings.IgnoreHostsCount,
370+
IgnoreHostsThreshold: clusterSettings.IgnoreHostsThreshold,
371+
InstanceProbes: mysql.NewProbes(),
371372
}
372373
for _, server := range servers {
373374
key := mysql.InstanceKey{Hostname: server.Host, Port: int(server.Port)}
@@ -389,9 +390,10 @@ func (throttler *Throttler) refreshMySQLInventory() error {
389390
keyspace, shard, strings.Join(vitess.ParseCells(clusterSettings.VitessSettings), ","),
390391
)
391392
clusterProbes := &mysql.ClusterProbes{
392-
ClusterName: clusterName,
393-
IgnoreHostsCount: clusterSettings.IgnoreHostsCount,
394-
InstanceProbes: mysql.NewProbes(),
393+
ClusterName: clusterName,
394+
IgnoreHostsCount: clusterSettings.IgnoreHostsCount,
395+
IgnoreHostsThreshold: clusterSettings.IgnoreHostsThreshold,
396+
InstanceProbes: mysql.NewProbes(),
395397
}
396398
for _, tablet := range tablets {
397399
key := mysql.InstanceKey{Hostname: tablet.MysqlHostname, Port: int(tablet.MysqlPort)}

0 commit comments

Comments
 (0)