-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resource slice race condition (#212)
It's possible that the reconciler process "sees" a resource slice before the corresponding composition. Currently we handle this correctly after the initial synthesis by comparing generations. But the logic is inverted in the case that the synthesis is nil - __resource slices are deleted if there is a newer composition generation__. For example: - Composition is created - Composition hits the reconciler informers - Synthesis starts and completes - Resource slice hits the reconciler informers - The slice is deleted by `shouldDeleteSlice` - either because the composition has been updated (newer generation than resource slice), or because composition is deleted) - Synthesis status hits the reconciler informers This doesn't break tests because the integration tests use the same informers for some controllers that normally run in separate processes, so events are received in the same order by both sets of controllers. --------- Co-authored-by: Jordan Olshevski <[email protected]>
- Loading branch information
Showing
2 changed files
with
136 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters