Skip to content

Conversation

by-dam
Copy link
Contributor

@by-dam by-dam commented Jan 12, 2017

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 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.

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.
@lightbend-cla-validator

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:

http://www.lightbend.com/contribute/cla

@akka-ci
Copy link

akka-ci commented Jan 12, 2017

Can one of the repo owners verify this patch?

@by-dam
Copy link
Contributor Author

by-dam commented Jan 12, 2017

CLA accepted

@johanandren
Copy link
Contributor

OK TO TEST

@johanandren
Copy link
Contributor

PLS BUILD

@patriknw
Copy link
Contributor

patriknw commented Feb 7, 2017

PLS BUILD

Copy link
Contributor

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label Feb 7, 2017
Copy link
Contributor

@johanandren johanandren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@akka-ci
Copy link

akka-ci commented Feb 7, 2017

Test FAILed.

@by-dam
Copy link
Contributor Author

by-dam commented Feb 7, 2017

It doesn't look like a test failure but a credential issue with ssh

@patriknw
Copy link
Contributor

patriknw commented Feb 7, 2017

ok, let's rebuild

@patriknw
Copy link
Contributor

patriknw commented Feb 7, 2017

PLS BUILD

@by-dam
Copy link
Contributor Author

by-dam commented Feb 7, 2017

Still the same issue:

+ ssh a5.local rm -rf /localhome/jenkinsakka/pr-validator-per-commit-jenkins/8313
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
Build step 'Execute a set of scripts' changed build result to FAILURE

@akka-ci akka-ci added tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels Feb 7, 2017
@akka-ci
Copy link

akka-ci commented Feb 7, 2017

Test PASSed.

@patriknw patriknw added this to the 2.5.0 milestone Feb 10, 2017
@patriknw patriknw merged commit 471311d into akka:master Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins to-be-backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants