Merge pull request #30839 from lavalamp/fix

Automatic merge from submit-queue

queueActionLocked requires write lock

Fix https://github.com/kubernetes/minikube/issues/368
Fix part of #30759

Hopefully. On stack dumps I couldn't see who was fighting with this.
This commit is contained in:
Kubernetes Submit Queue 2016-08-18 02:43:25 -07:00 committed by GitHub
commit 86340fc123

View File

@ -496,8 +496,8 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error {
// Resync will send a sync event for each item
func (f *DeltaFIFO) Resync() error {
f.lock.RLock()
defer f.lock.RUnlock()
f.lock.Lock()
defer f.lock.Unlock()
for _, k := range f.knownObjects.ListKeys() {
obj, exists, err := f.knownObjects.GetByKey(k)
if err != nil {