=per #15457 Correlate persistAsync handlers with journal messages

We have assumed that the handlers can be popped when replies come back from journal, but if messages to journal are in flight when the actor is restarted the handlers does not match up with journal replies.

This solution ignores journal replies that were emitted by an old PersistentActor instance
by passing an uid with the journal messages. This means that the handler will not be
invoked for such messages.

(cherry picked from commit 7ebaaab669c9e467a1ffb4d9ed8b6500e1801a7c)

Conflicts:
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala
This commit is contained in:
Patrik Nordwall 2014-06-26 17:35:46 +02:00
parent 33c7f6bb4f
commit 8eec3f92d3
11 changed files with 126 additions and 56 deletions

View file

@ -535,7 +535,7 @@ Managagement Messages
These management messages may be handled after other messages, so if you send ``AddRoutee`` immediately followed
an ordinary message you are not guaranteed that the routees have been changed when the ordinary message
is routed. If you need to know when the change has been applied you can send ``AddRoutee`` followed by ``GetRoutees``
and when you receive the ``Routees`` reply you know that the preceeding change has been applied.
and when you receive the ``Routees`` reply you know that the preceding change has been applied.
.. _resizable-routers-scala: