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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

highestSequenceNo should be kept on message deletion

eshepelyuk opened this issue · comments

With AKKA 2.4.1 release there comes a clarification about highestSeqenceNo behavior on message deletion. This issue akka/akka#18559 adds tests to plugin TCK that will enforce maintaining highestSequenceNo for persistenceId after message deletion or journal cleanup.

Currently akka-persistence-inmemory doesn't maintain highestSequenceNo, and it is reset on journal cleanup. This should be fixed for future compatibility with AKKA 2.4.1

@dnvriend I'd like to pick up and fix the issue if you have no objections.

I have read the issue. Martin Krasser's Cassandra plugin uses a metadata model that stores the deleted_to sequence number for the persistence_id, so that the sequence number will never be rewind to zero. The case as explained by Patrik Nordwall would be solved when the journal saves the state into the metadata model. This way, sequence numbers will always be incremented, even after deletion.

No problem if you want to fix the issue :)

Fixed with release v1.1.5