Update expiration timeout based on observed latencies
This commit is contained in:
2
pkg/client/cache/expiration_cache.go
vendored
2
pkg/client/cache/expiration_cache.go
vendored
@@ -18,6 +18,7 @@ package cache
|
||||
|
||||
import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/golang/glog"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -81,6 +82,7 @@ func (c *ExpirationCache) getOrExpire(key string) (interface{}, bool) {
|
||||
return nil, false
|
||||
}
|
||||
if c.expirationPolicy.IsExpired(timestampedItem) {
|
||||
glog.V(4).Infof("Entry %v: %+v has expired", key, timestampedItem.obj)
|
||||
// Since expiration happens lazily on read, don't hold up
|
||||
// the reader trying to acquire a write lock for the delete.
|
||||
// The next reader will retry the delete even if this one
|
||||
|
Reference in New Issue
Block a user