Skip to content
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

WIP 2.4 not working correctly with EventAdapters #75

Closed
pjan opened this issue Aug 18, 2015 · 10 comments
Closed

WIP 2.4 not working correctly with EventAdapters #75

pjan opened this issue Aug 18, 2015 · 10 comments
Milestone

Comments

@pjan
Copy link

pjan commented Aug 18, 2015

STR:

  1. Register an eventadapter for a persisted event
  2. Override the stringmanifest in said adapter with a switch based on the event content (e.g. amount less or more than x)

Expected:

  • Select the correct event adapter step upon replay based on the set manifest

Actual:

  • Select the adapter step for the empty ("") manifest
@chbatey
Copy link
Collaborator

chbatey commented Sep 3, 2015

I re-created this, seems the manifest is being lost on deserialisation, checking with the akka dev team

@chbatey
Copy link
Collaborator

chbatey commented Sep 3, 2015

I think this is a bug in the akka persistence default serialiser for PersistentRepr, i changed our code to:

  private def persistentToByteBuffer(persistentRepr: PersistentRepr): ByteBuffer = {
    val bytes = serialization.serialize(persistentRepr).get
    val back = serialization.deserialize(bytes, classOf[PersistentRepr]).get
    require(persistentRepr.manifest == back.manifest)
    ByteBuffer.wrap(bytes)
  }

And it fails.

@ktoso
Copy link

ktoso commented Sep 3, 2015

Thanks for the ping @chbatey! Seems weird, I'll look into it today after some Http work.
Maybe it's some silly mistake as we have payloadManifest and manifest, perpahs our tests were setting up to much manually to catch this hm, I'll report back soon!

@chbatey
Copy link
Collaborator

chbatey commented Sep 4, 2015

Looks like this is fixed in master of akka, will check when we upgrade to 2.4-RC2

@ktoso
Copy link

ktoso commented Sep 4, 2015

Yup, and we'll release the RC2 today to not block you guys with this bug.
Thanks for catching it again.

@pjan
Copy link
Author

pjan commented Sep 4, 2015

Thanks guys!

@ktoso
Copy link

ktoso commented Sep 4, 2015

Hi guys, the fix in Akka has been pushed – please bump to 2.4.0-RC2 👍

@chbatey
Copy link
Collaborator

chbatey commented Sep 4, 2015

Thanks @ktoso works for me, @pjan ?

@pjan
Copy link
Author

pjan commented Sep 16, 2015

can be closed.

@chbatey chbatey closed this as completed Sep 16, 2015
@ktoso
Copy link

ktoso commented Sep 16, 2015

Yay :)
On Sep 16, 2015 09:27, "Christopher Batey" notifications@github.com wrote:

Closed #75
#75.


Reply to this email directly or view it on GitHub
#75 (comment)
.

@krasserm krasserm modified the milestone: 0.4 Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants