+ LambdaDoc samples now in the docs project
= simplified internal state by removing recoveryPending
= recovery is now triggered in around* method, so user is free to use
preStart freely - recovery works even if one forgets to call super on
preStart
* changing Plugin API for asyncWriteMessages and writeMessages
* passing explicit AtomicWrite that represents the events of
persistAll, or a single event from persist
* journal may reject events before storing them, and that
will result in onPersistRejected (logging) and continue in the
persistent actor
* clarified the semantics with regards to batches and atomic writes,
and failures and rejections in the api docs of asyncWriteMessages
and writeMessages
* adjust the Java plugin API, asyncReplayMessages, doLoadAsync
+ per plugin scoped adapters
+ could be swapped during runtime
+per EventAdapter now has manifest and is configurable ai la serializers
+ json examples in docs
+ including "completely manual" example in case one wants to add
metadata TO the persisted event
+ better error reporting when misconfigured bindings
+ manifest is handled by in memory plugin
- did not check if it works with LevelDB plugin yet
> TODO: json example uses Gson, as that's simplest to do, can we use
+per allows 1:n adapters, multiple adapters can be bound to 1 class
* in the end TestKitBase eagerly initialize the ActorSystem and
to avoid the need for using lazy val tricks I changed the trait
to abstract class with config constructor parameter
* remove channels
* remove View
* remove Processor
* collapse the complicated internal state management
that was spread out between Processor, Eventsourced and Recovery
* remove Recovery trait, this caused some duplication between Eventsourced
and PersistentView, but but the enhanced PersistentView will not be based
on recovery infrastructure, and therefore PersistentView code will be replaced anyway
* remove PersistentBatch
* remove LoopMessage
* remove deleteMessages of individual messages
* remove Persistent, PersistentRepr and PersistentImpl are kept
* remove processorId
* update doc sample code
* note in migration guide about persistenceId
* rename Resequencable to PersistentEnvelope
* deprecates awaitTermination, shutdown and isTerminated
* introduces a terminate-method that returns a Future[Unit]
* introduces a whenTerminated-method that returns a Future[Unit]
* simplifies the implementation by removing blocking constructs
* adds tests for terminate() and whenTerminated
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
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
* 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
* afterAll not called when all tests marked as ignore,
invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected = true
should solve that, but changed to pending in Ticket1978 anyway
* Try to shutdown when ActorSystem init fails. It is difficult
to cover all scenarios, but this should improve the situation.
This was the reason why DeployerSpec leaked.
* missing shutdown in some tests
- Built-in redelivery mechanism for Channel and PersistentChannel
- redelivery counter on ConfirmablePersistent
- redeliveries out of initial message delivery order
- relative order of redelivered messages is preserved
- configurable redelivery policy (ChannelSettings)
- Major refactorings of channels (and channel tests)
- Throughput load test for PersistentChannel
Todo:
- Paged/throtlled replay (another pull request)
- Resequencer (another pull request)
- internal batching of individually received Persistent messages
- testing fault tolerance of Processor in presence of random
* journaling failures
* processing failures
- single and bulk deletion of messages
- single and bulk deletion of snapshots
- run journal and snapshot store as system actors
- rename physical parameter in delete methods to permanent
- StashSupport.prepend docs and implementation enhancements
- Persistent channel
- ConfirmablePersistent message type delivered by channel
- Sender resolution performance improvements
* unstash() instead of unstashAll()
These enhancements required the following changes
- Unified implementation of processor stash and user stash
- Persistence message plugin API separated from implementation
- Physical deletion of messages