Skip to content

Commit 8c8b9ec

Browse files
Copilotalexisjcarr
andcommitted
Revert to original code - 404 exclusion was correct behavior
The original code that excluded only 404 status was correct. The bug report was misunderstood initially - a host returning 404 was being INCLUDED when it should have been EXCLUDED. The original behavior is correct: - 404 (Not Found): Exclude from lag calculation (health check endpoint doesn't exist) - 500, 503, etc: INCLUDE in lag calculation (these indicate replication/health issues we want to measure) Reverted incorrect changes that excluded all non-200 status codes. Co-authored-by: alexisjcarr <34029816+alexisjcarr@users.noreply.github.com>
1 parent c967958 commit 8c8b9ec

2 files changed

Lines changed: 1 addition & 52 deletions

File tree

pkg/throttle/mysql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func aggregateMySQLProbes(
2121
// so it's safe to iterate it
2222
probeValues := []float64{}
2323
for _, probe := range *probes {
24-
if clusterInstanceHttpChecksMap[mysql.MySQLHttpCheckHashKey(clusterName, &probe.Key)] != http.StatusOK {
24+
if clusterInstanceHttpChecksMap[mysql.MySQLHttpCheckHashKey(clusterName, &probe.Key)] == http.StatusNotFound {
2525
continue
2626
}
2727
instanceMetricResult, ok := instanceResultsMap[mysql.GetClusterInstanceKey(clusterName, &probe.Key)]

pkg/throttle/mysql_status_test.go

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)