mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Don't update checkpoint file for deletion
This commit is contained in:
		| @@ -142,8 +142,10 @@ func (sc *stateCheckpoint) SetPodResourceAllocation(podUID types.UID, alloc map[ | |||||||
| func (sc *stateCheckpoint) Delete(podUID types.UID, containerName string) error { | func (sc *stateCheckpoint) Delete(podUID types.UID, containerName string) error { | ||||||
| 	sc.mux.Lock() | 	sc.mux.Lock() | ||||||
| 	defer sc.mux.Unlock() | 	defer sc.mux.Unlock() | ||||||
| 	sc.cache.Delete(podUID, containerName) | 	// Skip writing the checkpoint for pod deletion, since there is no side effect to | ||||||
| 	return sc.storeState() | 	// keeping a deleted pod. Deleted pods will eventually be cleaned up by RemoveOrphanedPods. | ||||||
|  | 	// The deletion will be stored the next time a non-delete update is made. | ||||||
|  | 	return sc.cache.Delete(podUID, "") | ||||||
| } | } | ||||||
|  |  | ||||||
| func (sc *stateCheckpoint) RemoveOrphanedPods(remainingPods sets.Set[types.UID]) { | func (sc *stateCheckpoint) RemoveOrphanedPods(remainingPods sets.Set[types.UID]) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tim Allclair
					Tim Allclair