dnvriend / akka-persistence-inmemory

Akka-persistence-inmemory is a plugin for akka-persistence that stores journal and snapshot messages memory, which is very useful when testing persistent actors, persistent FSM and akka cluster
Apache License 2.0
134 stars 41 forks source link

InMemoryReadJournal.eventsByPersistenceId returns deleted messages #33

Closed davidcorcoran closed 7 years ago

davidcorcoran commented 7 years ago

In commit 9ce9a6b "find deleted messages" you changed the way currentEventsByPersistenceId (and therefore eventsByPersistenceId) worked so that they now return deleted messages. I think the expected behaviour for them would be to not return deleted messages. I believe that's how your akka-persistence-jdbc library works, messages flagged as deleted are filtered out.

I stumbled across this while writing test code which was supposed to test that the correct messages we're being deleted, but the journal was always returning them despite the fact they were deleted.

So I think this is a bug, but could be wrong.

Thanks

dnvriend commented 7 years ago

Thanks for creating the issue. I'll take a look at it.

dnvriend commented 7 years ago

You were absolutely correct, it was a bug. It should be fixed in release v2.4.17.2 and should be synced on Maven Central the following hours/days.

davidcorcoran commented 7 years ago

I've updated to v2.4.17.2 this morning and my tests which were previously failing are now passing. Thank you for fixing the bug and for fixing it so quickly. Both this and akka-persistence-jdbc are great libraries.

dnvriend commented 7 years ago

Thanks!