-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPE on sendCorrelateCommand() side-effect #9966
Conversation
Test Results 804 files ± 0 1 errors 803 suites ±0 1h 36m 57s ⏱️ + 4m 38s For more details on these parsing errors, see this check. Results for commit cea3418. ± Comparison against base commit 77114d6. ♻️ This comment has been updated with latest results. |
With the engine abstraction topic the response writer is already getting flushed in the `executeSideEffects()` method of the `ProcessingStateMachine`. Flushing a second time here causes NullPointerExceptions
0c5cf93
to
cea3418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Please add a test case
I don't know how to test this further than the tests we already have. The existing test cases should already cover this as there is no change in functionality. |
@remcowesterhoud I don't really understand how the NPE could've happened. But if we do understand, then we can reproduce the situation in a test. The test can assert that the message is correctly correlated. Before your change, the engine would blow up with the NPE. After the change, the test would pass. At least, that's how I think about it, but I didn't really understand the scenario. If you want we discuss it F2F |
@korthout The NPE that occurred was swallowed and didn't blow up anything. It was an actor that crashed without any impact. Happy to discuss it F2F if it helps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing F2F, it's clear that the exception is swallowed by the actor. So even if it's reproducible, it's not assertable.
The problem is that any of the side effects could potentially fail (although they shouldn't) and there is no feedback mechanism. Note that we can't roll back the command when we're executing the side effects for it, because some side effects may have already been executed and side effects can't be rolled back.
💡 We could verify that no exceptions are thrown in the side effects execution during tests to avoid this situation in the future. @Zelldon is that something we should consider in the engine abstraction topic?
Anyways LGTM 👍
bors merge |
Build succeeded: |
Description
With the engine abstraction topic the response writer is already getting flushed in the
executeSideEffects()
method of theProcessingStateMachine
. Flushing a second time here causes NullPointerExceptions.Related issues
closes #9860
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.