- Move all entry related logic out of the ShardRegion and into a
new dedicated child `Shard` actor.
- Shard actor persists entry started and passivated messages.
- Non passivated entries get restarted on termination.
- Shard Coordinator restarts shards on other regions upon region failure or handoff
- Ensures shard rebalance restarts shards.
- Shard buffers messages after an EntryStarted is received until state persisted
- Shard buffers messages (still) after a Passivate is received until state persisted
- Shard will retry persisting state until success
- Shard will restart entries automatically (after a backoff) if not passivated and remembering entries
- Added Entry path change to the migration docs
* The filter is used by the LoggingAdapter before publishing
to the event bus
* Slf4jLoggingFilter uses backend log level configuration
(e.g. logback.xml)
For example in Java 7 you can now join a multicast group:
case class JoinGroup(group: InetAddress, networkInterface: NetworkInterface) extends SocketOption {
override def afterConnect(c: DatagramChannel): Unit = {
c.join(group, networkInterface)
}
}
IO(Udp) ! Udp.Bind(self, new InetSocketAddress(MulticastListener.port),
options=List(ReuseAddress(true),
JoinGroup(MulticastListener.group, MulticastListener.interf)))
Other minor changes:
- changed all methods in SocketOption to take a Channel instead of a Socket. The socket can be gotten from the Channel but not the reverse.
- all methods that are called before the bind are now called beforeBind for consistency.
- All network connections now call the beforeBind and afterConnect.
When in `A`:
* `goto(A)` will trigger `onTransition(A -> A)`
* `stay()` will NOT trigger `onTransition`
Includes:
* migration guide
* docs updates
* test
Original here: https://github.com/krasserm/akka-persistence-testkit
New features:
* merged martin's tests
* usable from java (junit 4)
* simple bench test, which helps checking if ordering is perserved under
bigger workloads and simple perf checking
* does NOT include tests for already deprecated features (deleteMessages)
* docs
Resolves#13815
Conflicts:
project/AkkaBuild.scala
Updated release date for "Akka Concurrency" and "Akka in Action" release date estimate, and added references to two books, "Effective Akka" and "Developing an Akka Edge".
We must first release akka-stream with dependency to akka 2.3.4
and it should be maintained in the akka-release-dev branch
(cherry picked from commit a97a067701cfc527b235707882e72326277415f3)
Conflicts:
akka-samples/akka-sample-persistence-scala/build.sbt
akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
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
* A few more adjustments, found when verifying source compatibility of a few
journal plugins
* Note that PersistentId will be removed with deleteMessage and we should
not break plugins because of that
* Add missing section of at-least-once delivery in migration guide
(cherry picked from commit 6727eac6d07280d277968e2e25db44e02be3b102)
Conflicts:
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
* also remove final of around methods, and let deliver send when not recoveryRunning
(cherry picked from commit 312b0d107a179accaf135f64ed9c3b78f3e351d1)
A PersistentView works the same way as View did previously, except:
* it requires an `peristenceId` (no default is provided)
* messages given to `receive` are NOT wrapped in Persistent()
akka-streams not touched, will update them afterwards on different branch
Also solves #15436 by making persistentId in PersistentView abstract.
(cherry picked from commit dcafaf788236fe6d018388dd55d5bf9650ded696)
Conflicts:
akka-docs/rst/java/lambda-persistence.rst
akka-docs/rst/java/persistence.rst
akka-docs/rst/scala/persistence.rst
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/View.scala
* This is NOT binary compatible, we're in an *experimental* module.
* disabled binary compat checks for package akka.persistence
* Source compatibility is retained, but users should migrate do the new
method name ASAP.
* Plugin APIs were migrated in a way that allows the old plugins to
compile agains 2.3.4 without having to change anything. Hopefuly this
will help authors migrate to 2.3.4 sooner. This is only source level compatible, not binary compatible.
* added deprecation warnings on all processorId methods and provided bridges where possible
* for users, the migration should be painless, they can still override
the old method, and it'll work. But we encourage them to move to
persistenceId; All delegation code will have to be removed afterwards ofc.
Conflicts:
akka-persistence/src/main/scala/akka/persistence/Channel.scala
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala
akka-persistence/src/main/scala/akka/persistence/Processor.scala
akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
akka-persistence/src/main/scala/akka/persistence/journal/inmem/InmemJournal.scala
akka-persistence/src/main/scala/akka/persistence/journal/leveldb/LeveldbKey.scala
akka-persistence/src/main/scala/akka/persistence/snapshot/SnapshotStore.scala
akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala
project/AkkaBuild.scala
* Deferred events are not persisted, thus will not participate in replays
etc. If users want events to be persisted, they can simply use
`persistAsync` instead.
* This, 3rd, rewrite extends the Persistent hierarchy by a top level
trait "Resequenceable", which is used to mark every event to be sent
in sequence back to the PersistentActor. These are split into
NonPersistentRepr or PersistentRepr, and acted upon accordingly.
* defer is guaranteed to be called, even after persistence failures
* Includes docs updates for java/scala/java8
Resolves#15229
Depends on #15227
Conflicts:
akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Processor.scala
akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
project/AkkaBuild.scala
Breaks binary compatibility because adding new methods to Eventsourced
trait. Since akka-persistence is experimental this is ok, yet
source-level compatibility has been perserved thankfuly :-)
Deprecates:
* Rename of EventsourcedProcessor -> PersistentActor
* Processor -> suggest using PersistentActor
* Migration guide for akka-persistence is separate, as wel'll deprecate in minor versions (its experimental)
* Persistent as well as ConfirmablePersistent - since Processor, their
main user will be removed soon.
Other changes:
* persistAsync works as expected when mixed with persist
* A counter must be kept for pending stashing invocations
* Uses only 1 shared list buffer for persit / persistAsync
* Includes small benchmark
* Docs also include info about not using Persistent() wrapper
* uses java LinkedList, for best performance of append / head on
persistInvocations; the get(0) is safe, because these msgs only
come in response to persistInvocations
* Renamed internal *MessagesSuccess/Failure messages because we kept
small mistakes seeing the class "with s" and "without s" as the same
* Updated everything that refered to EventsourcedProcessor to
PersistentActor, including samples
Refs #15227
Conflicts:
akka-docs/rst/project/migration-guides.rst
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
project/AkkaBuild.scala