GitHub user migesok added a comment to the discussion: Why 
AsyncWriteJournal.Resequencer is needed?

After some experiments and diving into Akka 2.6 and Pekko code, I came to this:

I'm almost certain that neither for a classic persistent actor, nor for a 
typed, one can observe differences in behaviour between AsyncWriteJournal with 
and without resequencer. It is because
- persistent actors inside 1 "incarnation" (between restarts) never do 2 
asyncWriteMessages calls simultaneously, they are always done 1 after another
- persistent actors discard and ignore asyncWriteMessages result responses from 
requests initiated by different "incarnations" of the same actor (courtesy of 
`actorInstanceId`)

So the only way to observe differences in behaviour with and without 
resequencer is to stage an interplay between 2 persistent actors, giving them 
commands to persist events, and observing order in which replies come back. It 
should never be visible if you look at isolated actors.

On one hand, resequencer can be dropped altogether, on another - could there be 
systems around which really depend on such intricate ordering guarantees which 
manifests only when several persistent actors work together? Possible but 
unlikely.

To be on the safe side, resequencer switch could be a plugin level config 
option.

My current plan is to roll out the change first inside our codebase. We are 
still running mostly on Akka 2.6 with Pekko migration in progress, using 
in-house journal and snapshot plugins. Then we will try to backport it to 
Pekko, if maintainers agree to take it.

GitHub link: 
https://github.com/apache/pekko/discussions/1881#discussioncomment-13367927

----
This is an automatically sent email for notifications@pekko.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@pekko.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to