Update global cache timestamp more frequently

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.
This commit is contained in:
Hironori Shiina 2024-05-08 09:49:49 +02:00
parent 76128586a2
commit dbc47341fa

View File

@ -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