Fix:slow memory leak may be in kubelet podworkers.isWorking

This commit is contained in:
KeZhang
2021-06-09 17:53:30 +08:00
parent 8ac5d4d6a9
commit 83ee5da75e
2 changed files with 26 additions and 1 deletions

View File

@@ -282,7 +282,8 @@ func (p *podWorkers) checkForUpdates(uid types.UID) {
p.podUpdates[uid] <- workUpdate
delete(p.lastUndeliveredWorkUpdate, uid)
} else {
p.isWorking[uid] = false
// put this line in removeWorker may cause dead lock, so keep reset it here
delete(p.isWorking, uid)
}
}