146
failedHostCountProportion := failedHostCount / float64(len(hosts))
147
if failedHostCountProportion+hostDeclinedServingProportion > h.hostFailurePercentage() {
148
>
h.logger.Warn("health check exceeded host failure percentage threshold",
health_check.go
149
>
tag.Float64("host failure percentage threshold", h.hostFailurePercentage()),
150
>
tag.Float64("host failure percentage", failedHostCountProportion),
151
>
tag.Float64("host declined serving percentage", hostDeclinedServingProportion),
152
>
tag.NewStringTag("example_failed_host", failedHostSummary(exampleFailedHost)),
153
>
)
154
>
overallState = enumsspb.HEALTH_STATE_NOT_SERVING
155
} else {
156
overallState = enumsspb.HEALTH_STATE_SERVING