mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-20 01:50:06 +00:00
Fix local cluster leaking memory.
Local cluster is leaking memory due to mutation detector being enabled. In addition there is no warning in the logs that this could be the issue. Added a log warning when this feature is enabled to make debugging this issue easier for other cases of this. Fixed import ordering as per @liggitt Kubernetes-commit: 07ba609b50d6f00c52acbfd6eaa43e6b527c5c2d
This commit is contained in:
parent
4f2b10cdd3
commit
cafb570f17
3
tools/cache/mutation_detector.go
vendored
3
tools/cache/mutation_detector.go
vendored
@ -24,6 +24,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
)
|
||||
@ -43,6 +45,7 @@ func NewCacheMutationDetector(name string) CacheMutationDetector {
|
||||
if !mutationDetectionEnabled {
|
||||
return dummyMutationDetector{}
|
||||
}
|
||||
glog.Warningln("Mutation detector is enabled, this will result in memory leakage.")
|
||||
return &defaultCacheMutationDetector{name: name, period: 1 * time.Second}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user