Repository navigation
Conversation
csviri
force-pushed
the
fix/change-namespaces-deadlock
branch
from
October 22, 2026 13:20
0eac016 to
e6bb598
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix removes the reported lock cycle, preserves lifecycle synchronization and parallel startup, and includes targeted regression coverage.
No open issues 🎉
What changed in this PR
Fixes #3650 by avoiding a deadlock when changeNamespaces() joins a populated shared informer in the core event-source runtime.
Changes:
- Registers handlers on the calling thread so synchronous cache replay can reenter the event-source monitor.
- Keeps informer startup parallel.
- Adds a regression test that simulates synchronous cache replay and verifies namespace changes complete and deliver an event.
| File | Description |
|---|---|
| operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/source/informer/ManagedInformerEventSourceNamespaceChangeTest.java | Adds deadlock regression coverage and shared test helpers. |
| operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerManager.java | Moves handler registration before parallel informer startup. |
Review effort: Balanced
…former Fabric8 replays an already populated informer's cache to a newly added handler synchronously, on the registering thread. changeNamespaces registered the handler on an informer starter thread while the event source held its monitor waiting for that thread, so the replay blocked on the monitor and deadlocked. Register the handlers on the calling thread and only start the informers in parallel. Fixes #3650
csviri
force-pushed
the
fix/change-namespaces-deadlock
branch
from
October 22, 2026 14:33
e6bb598 to
72e7bbc
Compare
This branch has not been deployed
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.
Fabric8 replays an already populated informer's cache to a newly added
handler synchronously, on the registering thread. changeNamespaces
registered the handler on an informer starter thread while the event
source held its monitor waiting for that thread, so the replay blocked
on the monitor and deadlocked. Register the handlers on the calling
thread and only start the informers in parallel.
Fixes #3650
Summary by CodeRabbit