| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ved before start Signed-off-by: Dennis-Mircea Ciupitu <dennis.mircea.ciupitu@gmail.com>
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Improves clarity around how the EventProcessor behaves when receiving events before it has been started, by documenting the deferral mechanism and updating the associated debug log message.
Changes:
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. thank you!
Sorry, something went wrong.
|
@Dennis-Mircea please format the code (it is enough if you run mvn clean install locally). thx! |
Sorry, something went wrong.
Signed-off-by: Dennis-Mircea Ciupitu <dennis.mircea.ciupitu@gmail.com>
Done! |
Sorry, something went wrong.
### What changes were proposed in this pull request? This PR aims to upgrade `java-operator-sdk` to 5.3.5. ### Why are the changes needed? To bring the latest bug fixes and improvements from `java-operator-sdk` 5.3.5: - https://github.com/operator-framework/java-operator-sdk/releases/tag/v5.3.5 - operator-framework/java-operator-sdk#3383 - operator-framework/java-operator-sdk#3414 - operator-framework/java-operator-sdk#3365 - operator-framework/java-operator-sdk#3382 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 Closes #712 from dongjoon-hyun/SPARK-57508. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? This PR aims to upgrade `java-operator-sdk` to 5.3.5. ### Why are the changes needed? To bring the latest bug fixes and improvements from `java-operator-sdk` 5.3.5: - https://github.com/operator-framework/java-operator-sdk/releases/tag/v5.3.5 - operator-framework/java-operator-sdk#3383 - operator-framework/java-operator-sdk#3414 - operator-framework/java-operator-sdk#3365 - operator-framework/java-operator-sdk#3382 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 Closes apache#712 from dongjoon-hyun/SPARK-57508. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
| Back | FazBrowse Home | New Git URL |
Summary
When the SDK starts up, there is a short window (observed at ~140 ms on Flink Kubernetes Operator startup) between when EventSourceManager starts the informers and when EventProcessor.start() is actually called. During that window, the initial informer LIST emits ADDED events for every existing resource, and EventProcessor.handleEvent(...) receives them while running == false.
The events are not lost. handleEvent calls resourceStateManager.getOrCreateOnResourceEvent(...), records the metric, and then calls handleEventMarking(event, state) before checking running. When EventProcessor.start() is eventually invoked, it sets running = true and calls handleAlreadyMarkedEvents(), which replays every state with eventPresent(). Delete events are also short-circuited to cleanupForDeletedEvent(...) even when not running.
The problem is that the log message in this branch is alarming and reads exactly like dropped work:
Skipping event: ResourceEvent{...} because the event processor is not started…and there is no JavaDoc on handleEvent explaining the marking-then-replay contract, so the only way to confirm "events are not lost" is to read the code.
This PR clarifies both:
No behavior change. Strictly an observability + documentation improvement.
Why this came up
While debugging an unrelated issue on Flink Kubernetes Operator, I noticed the following sequence in DEBUG logs at startup:
EventSourceManager [DEBUG] Starting event source ControllerResourceEventSource ... InformerWrapper [DEBUG] Starting informer for namespace: JOSDK_ALL_NAMESPACES ... EventProcessor [DEBUG] Received event: ResourceEvent{action=ADDED, ...} EventProcessor [DEBUG] Skipping event: ResourceEvent{...} because the event processor is not started ... (repeats for many resources) ... EventProcessor [DEBUG] Starting event processor: ...The "Skipping event ... not started" message is misleading as it looks like silently dropped initial state. The code is correct (the events are marked and replayed via handleAlreadyMarkedEvents), but the log line and the missing JavaDoc made it hard to tell from operator logs alone.