Skip to content

Commit

Permalink
Merge branch 'release-7.5' into cherry-pick-7878-to-release-7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
HuSharp authored Mar 27, 2024
2 parents 3dc260d + 8783927 commit 68a2151
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/utils/etcdutil/health_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,14 @@ func (checker *healthChecker) updateEvictedEps(lastEps, pickedEps []string) {
pickedSet[ep] = true
}
// Reset the count to 0 if it's in evictedEps but not in the pickedEps.
checker.evictedEps.Range(func(key, _ any) bool {
checker.evictedEps.Range(func(key, value any) bool {
ep := key.(string)
if !pickedSet[ep] {
count := value.(int)
if count > 0 && !pickedSet[ep] {
checker.evictedEps.Store(ep, 0)
log.Info("reset evicted etcd endpoint picked count",
zap.String("endpoint", ep),
zap.Int("previous-count", count),
zap.String("source", checker.source))
}
return true
Expand Down

0 comments on commit 68a2151

Please sign in to comment.