Commit graph

63 commits

Author SHA1 Message Date
Patrik Nordwall
6ed3972f4e
lastSequenceNumber in DurableStateBehavior, #30833 (#30834)
* Recovering Behavior must be a class for the WithSeqNrAccessible to be able
  to find it
2021-12-16 13:41:28 +01:00
Patrik Nordwall
3a2c1a688d
Hardening of ReplicatedEventSourcingSpec, #30842 (#30937)
* from logs it looks like the replicated event from the first
  incarnation of the actor isn't stored before the second
  incarnation is replayed
* stop and wait for termination before starting second incarnation
2021-11-24 13:53:29 +01:00
Arnout Engelen
02f0679e84
scala3: build/test akka-persistence-tck and akka-persistence-typed-tests (#30911) 2021-11-19 13:48:25 +01:00
Arnout Engelen
14bf4655f3
Allow 'currentPersistenceIds' for ReadJournal (#30878)
* allow 'currentPersistenceIds' for eventsourced journals

This allows `currentPersistenceIds(afterId, limit)`
to be mixed in with ReadJournal as well as with
DurableStateStore.

Instead of duplicating `CurrentDurableStatePersistenceIdsQuery` I
renamed it to `PagedPersistenceIdsQuery` and removed the restriction
that it must be a `DurableStateStore`. The downside is that it is less
obvious where it should/can be mixed in, that is now only communicated
through the java/scaladoc and the testkit example.

* Split Journal and DurableState traits
2021-11-15 11:54:47 +01:00
Patrik Nordwall
ced82528cf
Harden another race condition in ReplicatedEventSourcingSpec, #30783 (#30784) 2021-10-20 07:49:39 +02:00
Johan Andrén
5da7dc6c19
ReplicatedEventSourcingSpec race fix #30661 (#30735) 2021-10-07 14:44:02 +02:00
Patrik Nordwall
f733639988
Harden EventSourcedBehaviorStashSpec, #30543 (#30644)
* remove assert on unhandled message, not important to
  what the test is verifying
* I think message 6 might not have arrived yet, and
  therefore not directed to unhandled
2021-09-07 10:46:19 +02:00
Patrik Nordwall
568877b56c
Harden ReplicatedEventSourcingSpec, 30548 (#30613) 2021-09-02 11:21:39 +02:00
Patrik Nordwall
a73cdf32fb
Harden EventSourcedBehaviorSpec, #30583 (#30611) 2021-09-02 11:04:21 +02:00
Patrik Nordwall
bb839128ab
Harden NullEmptyStateSpec (#30610)
* similar wait for termination as was done for a few others
* also improved corresponding test for durable state
2021-09-02 10:28:18 +02:00
Debasish Ghosh
f4ce74f255 Fixed possible race condition 2021-08-27 14:52:44 +05:30
Debasish Ghosh
3799ebb453 Tagged as GHExcludeTest in ReplicatedEventSourcing 2021-08-27 13:43:29 +05:30
Debasish Ghosh
65442bd6a9 Fixed yet another race condition 2021-08-27 13:23:42 +05:30
Debasish Ghosh
84695e0854 Fix test to avoid race condition from multiple persistent actors 2021-08-27 12:28:56 +05:30
Debasish Ghosh
420b52e6be
Minor fixes in tests and documentation (#30440) 2021-07-28 16:02:03 +05:30
Debasish Ghosh
b98c3b2da6
First draft of reference docs on durable state (#30387)
* First draft of reference docs on durable state
2021-07-16 12:41:19 +05:30
Patrik Nordwall
54261ceadd Merge branch 'master' into wip-state-merge-patriknw 2021-07-08 14:26:35 +02:00
Raymond Roestenburg
c4903ebe1e Moved inmem temporarily to query because of DurableStateStoreQuery.
* move to akka-persistence-testkit
* Delegating to scaladsl InMemDurableStateStore.
* InMemDurableStateStore -> PersistenceTestKitDurableStateStore
* implement changes query
2021-07-08 14:19:09 +02:00
Patrik Nordwall
8573c70883
Remove ApiMayChange for Replicated Event Sourcing, #30346 (#30347) 2021-06-28 17:11:55 +02:00
Patrik Nordwall
cbf717b6fc fix default DurableStateStore pluginId and config, #30277 2021-06-04 15:50:21 +02:00
Debasish Ghosh
6fffbe5a27
More tests on DurableStateBehavior (#30285)
* More tests on DurableStateBehavior

* ScalafmtCheck

* Removed unused variable

* Removed unused variable
2021-06-04 19:12:12 +05:30
Debasish Ghosh
78ff85d0fb Initial implementation of DurableStateStore and one test 2021-06-03 14:41:02 +02:00
Johan Andrén
b5cbf383d6
Move typed persistence tests away from LevelDB (#30224) 2021-06-02 17:15:18 +02:00
Andrei Arlou
48e4f11dfd
Change parameter order in assertEquals (#30247) 2021-05-25 17:46:07 +02:00
Andrei Arlou
f568d4d4f9
Remove usage of Java assert in tests (#30220) (#30227) 2021-05-07 21:27:39 +02:00
Renato Cavalcanti
571aa85a36
Add settings to use context.log for internal ESB logging (#30202)
* add settings to use context.log for internal ESB logging

* only force ctx.log if needed

* removed hardcoded value

* fix compilation
2021-04-27 15:22:53 +02:00
Johan Andrén
c5655a9ce6
Upgrade to Scala 2.13.5 (#30072) 2021-03-30 20:57:23 +02:00
Renato Cavalcanti
63aa1453d0
Adds internal logger for EventSourcedBehavior (#30007)
* don't log user event data

* move EventSourcedBehavior internal logs to dedicated logger
2021-02-15 14:47:39 +01:00
Andrea Peruffo
da70e0ccd4
Scala 3 cross compatible akka-actor / akka-testkit / akka-actor-tests (#29956)
* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
2021-02-01 16:38:29 +01:00
Arnout Engelen
31f654768f
Update copyright to 2021 2021-01-08 17:55:38 +01:00
Patrik Nordwall
bb985b82c6 fix compilation errors 2020-09-03 13:42:42 +02:00
Christopher Batey
2d9660f847 Final review feedback 2020-08-25 10:02:27 +01:00
Christopher Batey
d1114495dd
Feedback from creating replicated entity sample (#29510)
* Fix javadsl and remove shard regions from ReplicatedSharding

* Simplyfy sharding API for replicated event sourcing

As the ShardRegion access has been removed then we will only initially
support Entity's with ShardingEnvelope meaning we can remove the type
param.

Also provide convenience constructors for running a replica on a role
and a replica in each DC

* Compile

* Review feedback

* feedback
2020-08-24 10:52:28 +01:00
Christopher Batey
849018b81e Replicated Sharding improvements (#29483)
* WIP

* Finishing touches to sharding updates

* Review feedback
2020-08-17 07:54:34 +01:00
Patrik Nordwall
779e827495 Counter example, shopping cart 2020-08-17 07:54:34 +01:00
Patrik Nordwall
2e0821c2f0 ORSet example, MovieWatchList 2020-08-17 07:54:33 +01:00
Patrik Nordwall
d078a6b65f LwwTime example
* show event and command handlers of the blog example in docs
* add blog example for Java
2020-08-17 07:54:33 +01:00
Patrik Nordwall
ac469e1a56 Polish Auction example
* adjust the style in the Scala example
  * AuctionEntity class instead of Setup class that is passed around
* add timer in recovery completed
2020-08-17 07:54:33 +01:00
Christopher Batey
5e9e490d88 Add entity type name for replicated entity (#29462)
* Add entity type name for replicated entity

* Review feedback

* Unused import
2020-08-17 07:54:33 +01:00
Christopher Batey
67eb74f076 Embed akka serialization inside jackson serialization (#29455)
* Embed akka serialization inside jackson serialization

Allows re-use of existing serializers when embedding the types in
Jackson

* Fix false dead code warning

* Move marker trait and add docs

* Remove module and document adding annotations

* Review feedback
2020-08-17 07:54:33 +01:00
Patrik Nordwall
7348939ff4 DRY ReplicatedEventSourcedBehavior.apply (#29454)
* and change signature of withEventPublishing and withDirectReplication
2020-08-17 07:54:33 +01:00
Patrik Nordwall
cd821fe3f8 Minor adjustments to replicated es docs (#29450)
* Minor adjustments to replicated es docs

* and a few aa leftovers

* link to more examples
2020-08-17 07:54:33 +01:00
Johan Andrén
9fb76bbea4 Tagging for replicated event sourcing (#29442)
* Tagging for replicated event sourcing
* Docs improvements
* Support for currentEventsByTag in persistence testkit and test coverage for tags in replicated
2020-08-17 07:54:33 +01:00
Christopher Batey
c945fbd7a1 Java auction example (#29443) 2020-08-17 07:37:59 +01:00
Christopher Batey
742352caba Restart replication stream from correct seen seqNr (#29436) 2020-08-17 07:37:59 +01:00
Johan Andrén
bf5ec198a4 Test case for three replicated event sourced entities added (#29438) 2020-08-17 07:37:59 +01:00
Johan Andrén
b03412d5b2 Rename active active to replicated event sourcing (#29435)
* Move active active internals into the internal package

* Renaming active active to Replicated Event Sourcing

* Rename of Active Active to Replicated Event Sourcing

* Revert changes to testkit

* Java test formatting...

* Gave up on getting apidoc to link to EventSourcedBehavior and made code snippets of it

Co-authored-by: Christopher Batey <christopher.batey@gmail.com>
2020-08-17 07:37:59 +01:00
Christopher Batey
e4f5781d65 Detect illegal access to context (#29431) 2020-08-17 07:37:58 +01:00
Johan Andrén
165b39d1e0 Incorrect assumption about event ordering in test fixed (#29411) 2020-08-17 07:37:58 +01:00
Johan Andrén
a563a9b69e Make sure to gracefully stop replication streams when aa actor stops #29406 2020-08-17 07:37:58 +01:00