Fix cluster degraded status not recovering after transient failures
The previous fix (6db4ee7a) cleared stale error messages but didn't mark
endpoints as healthy again after successful operations. This caused
clusters to remain in "degraded" state permanently once any endpoint had
a temporary issue, even if all endpoints were actually working.
The fix now marks endpoints healthy in clearEndpointError() after
successful operations, ensuring degraded clusters recover automatically.
Related to #659
This commit is contained in:
parent
fbabace023
commit
4e05285567
1 changed files with 4 additions and 0 deletions
|
|
@ -401,10 +401,14 @@ func (cc *ClusterClient) markUnhealthyWithError(endpoint string, errMsg string)
|
|||
}
|
||||
|
||||
// clearEndpointError removes any cached error for an endpoint after successful operations
|
||||
// and marks the endpoint as healthy since the operation succeeded
|
||||
func (cc *ClusterClient) clearEndpointError(endpoint string) {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
delete(cc.lastError, endpoint)
|
||||
// Mark endpoint healthy since operation succeeded - this ensures degraded
|
||||
// clusters recover once endpoints start responding again
|
||||
cc.nodeHealth[endpoint] = true
|
||||
}
|
||||
|
||||
// recoverUnhealthyNodes attempts to recover unhealthy nodes
|
||||
|
|
|
|||
Loading…
Reference in a new issue