-
Notifications
You must be signed in to change notification settings - Fork 3.6k
#22136 - Wraps CombinedReadEventAdapter into NoopWriteEventAdapter #22137
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
#22136 - Wraps CombinedReadEventAdapter into NoopWriteEventAdapter #22137
Conversation
When multiple event-adapters are configured they are combined into a single instance of `CombinedReadEventAdapter`. However `CombinedReadEventAdpater` is not just a `ReadEventAdapter` but a full `EventAdapter` which throws an `IllegalStateException("CombinedReadEventAdapter must not be used when writing (creating manifests) events!")` when its `toJournal` method is called. The `CombinedReadEventAdapter` is not wrapped into `NoopWriteEventAdapter` (because it's not a `ReadEventAdapter`) and therefore it doesn't avoid the `toJournal` calls. This is especially problematic when multiple `ReadEventAdapter` are combined together as illustrated in the new testcase.
Hi @by-dam, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
Can one of the repo owners verify this patch? |
CLA accepted |
OK TO TEST |
PLS BUILD |
PLS BUILD |
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.
LGTM
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.
LGTM, thanks!
Test FAILed. |
It doesn't look like a test failure but a credential issue with ssh |
ok, let's rebuild |
PLS BUILD |
Still the same issue:
|
Test PASSed. |
Fix for reported issue #22136
When multiple event-adapters are configured they are combined into a single instance of
CombinedReadEventAdapter
.However
CombinedReadEventAdpater
is not just aReadEventAdapter
but a fullEventAdapter
which throws an
IllegalStateException("CombinedReadEventAdapter must not be used when writing (creating manifests) events!")
when its
toJournal
method is called.The
CombinedReadEventAdapter
is not wrapped intoNoopWriteEventAdapter
(because it's not aReadEventAdapter
) and therefore it doesn't avoid thetoJournal
calls.This is especially problematic when multiple
ReadEventAdapter
are combined together as illustrated in the new testcase.