Skip to content

Commit

Permalink
Update global cache timestamp more frequently
Browse files Browse the repository at this point in the history
There are some cases where a pod worker is woken up without a cache
update by the PLEG such as a pod termination. Then, the worker gets
stuck in `cache.GetNewerThan()` till the global cache timestamp is
updated by the PLEG. In order to unblock the stuck worker as early as
the Generic PLEG, this fix makes the Evented PLEG update the global
cache as frequently as the Generic PLEG.
  • Loading branch information
hshiina committed May 8, 2024
1 parent 7612858 commit dbc4734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubelet/pleg/evented.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// The frequency with which global timestamp of the cache is to
// is to be updated periodically. If pod workers get stuck at cache.GetNewerThan
// call, after this period it will be unblocked.
const globalCacheUpdatePeriod = 5 * time.Second
const globalCacheUpdatePeriod = 1 * time.Second

var (
eventedPLEGUsage = false
Expand Down

0 comments on commit dbc4734

Please sign in to comment.