🐛 Switch queue informer to use types.Namespace name; relocate deletion handler#3483
Merged
perdasilva merged 2 commits intooperator-framework:masterfrom Jan 15, 2025
Merged
Conversation
9a527fe to
18cc8e9
Compare
9d6ea2f to
d9c2337
Compare
4c2ba9d to
dcc3cc2
Compare
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
dcc3cc2 to
4eeb969
Compare
perdasilva
approved these changes
Jan 15, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change:
This PR addressed the #3010. The root cause of the issue was that the workqueue backing the QueueInformer was processing different types: string, and ResourceEvent. This led to concurrent processing of the same resource causing the Subscription to get mangled. To address this issue, this PR:
The reason for 2. is that the Sync function expects the resource as a parameter. The code does not add finalizers to resources or appropriately handle resource deletion. We judged that change to be too risky and opted for this solution. This means there is still the possibility that a delete and update event could be handled concurrently. We don't think this will be a problem because either worker won't be able to pull the resource from the index (it was deleted), and will be discarded, or the update handler will hit a resource not found error as the resource is no longer in etcd anyway. Far from ideal, but it doesn't make the current behavior worse, and it solves concurrent resource update handling, which is the source of the problem anyway.
Closes #3010
Motivation for the change:
Architectural changes:
Testing remarks:
Reviewer Checklist
/doc[FLAKE]are truly flaky and have an issue