mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-14 19:17:56 +00:00
Reduce log level for optimistic lease update fallback
The "Failed to update lease optimistically, falling back to slow path" message was logged at Error level, but this is expected behavior during normal leader election when the optimistic update encounters a conflict. The system gracefully falls back to the slow path (Get + Update), so this is not a real error. Downgrade to V(2) Info to reduce log noise. Kubernetes-commit: 04977a0ea4592bfaa70d5095a4cfe99dd4b847e1
This commit is contained in:
committed by
Kubernetes Publisher
parent
9b29e67df1
commit
ea7a7e7cf9
@@ -451,7 +451,7 @@ func (le *LeaderElector) tryAcquireOrRenew(ctx context.Context) bool {
|
||||
le.setObservedRecord(&leaderElectionRecord)
|
||||
return true
|
||||
}
|
||||
logger.Error(err, "Failed to update lease optimistically, falling back to slow path", "lock", le.config.Lock.Describe())
|
||||
logger.V(2).Info("Failed to update lease optimistically, falling back to slow path", "lock", le.config.Lock.Describe(), "err", err)
|
||||
}
|
||||
|
||||
// 2. obtain or create the ElectionRecord
|
||||
|
||||
Reference in New Issue
Block a user