* Optimize LoadSnapshot if toSequenceNr == 0, i.e. SnapshotCriteria.none,
then no need to involve the snapshot store
* Optimize ReplayMessages if toSequenceNr == 0, i.e. Recovery.none,
then no need to do asyncReplayMessages, but asyncReadHighestSequenceNr
is still needed
* should still load snapshot if critera != none and toSeqNr == 0,
weird case for saving/loading snapshots with seqNr 0
* The ThreadLocal Serialization.currentTransportInformation is used for serializing local
actor refs, but it's also useful when a serializer library e.g. custom serializer/deserializer
in Jackson need access to the current ActorSystem.
* We set this in a rather ad-hoc way from remoting and in some persistence plugins, but it's only
set for serialization and not deserialization, and it's easy for Persistence plugins or other
libraries to forget this when using Akka serialization directly.
* This change is automatically setting the info when using the ordinary serialize and deserialize
methods.
* It's also set when LocalActorRefProvider, which wasn't always the case previously.
* Keep a cached instance of Serialization.Information in the provider to avoid
creating new instances all the time.
* Added optional Persistence TCK tests to verify that the plugin is setting this
if it's using some custom calls to the serializer.
* Allow reuse of journal loading logic
Probably can be generialised even more. At present i've tested this with
the akka persistence updater extension.
* Make the implicit explicit
* Added mima filter for removing internal class
* Review feedback
AutoReceivedMessage with FSM schedule bug fixed (#24080)
Tests added for both FSM and Timers trait for (#24080)
AutoReceivedMessage with PersistentFSM bug fixed and test added (#24080)
timeout is explicitly a message of Command
persitAll and chainable side effects work well
more tests pasing
additional sanity check that mutable behaviors work as expected
unstashing needs to "loop through" the AdapterActor otherwise Stopped
won't work
solve unstashing/stop issue, by not randomly init()ing, but unstashing
snapshotting works
all tests green
rebased
nicer log source
remove IncomingCommand wrapper, we dont need it
no need for shared counter
remove not needed methods and state
more state cleanup, using Behaviors.same
reminder that we DO need that same alias, since stash does not work with
the Behavior.same
introduce config for stash buffer
stopping now works after persisting
compile fix
cleanup
reduced number of adapter styles needed for co-existence of persistence
final cleanup done, less passing around 40 objects, carriers provided
now
* missing for some error cases
* in the states recoveryStarted and recovering it has got the permit and
it must returned if the actor is stopped due to some error in those
states
* it would have been a lot easier to do such in postStop but we can't
introduce new things in the trait Eventsourced due to BC
silly serialization mistake, should have fixed serialize as well
tage actors now can have names, which helps a lot in debugging
thread weirdness
make sure to fail properly, actually go over remoting
issue with not receiving the SinkRef... what
initial working SinkRef over remoting
remote Sink failure must fail origin Source as well
cleaning up and adding failyre handling
SinkRef now with low-watermark RequestStrategy
source ref works, yet completely duplicated code
* the order was also wrong in the AbstractPersistentActorWithTimers
* mima complains about this change for AbstractPersistentActor and
AbstractPersistentActorWithAtLeastOnceDelivery, but I think it is ok
This once failed where the intial shopping cart before adding an item
was not empty. I've also changed the item prices to be different for
each test just in case we're picking up state from a previous test
(which seems unlikey given the pid is a random uuid)
* Apply [Boy scout rule](https://github.com/akka/akka/blob/master/CONTRIBUTING.md#additional-guidelines)
* [Bug#23329] PersistentFSM: andThen callbacks are not executed when stay()
* [fixes#23329] PersistentFSM: andThen callbacks go execute when stay()
* At documentation: there is nothing said about events applied should decide to invoke andThen or not.
* At code: andThen callback can be specified whether any events/state transition applied or not.
Added call to nextState.afterTransitionDo(stateData) even if there are no eventsToPersist
`State.using` is a valid pattern in regular FSM. However, for persistent FSM
it makes no sense and is marked as `private[akka]`. The `private[akka]` modifier does
not translate into bytecode so that Java users won't see that it should not be used.
Deprecating it will allow us to remove it in the future.
Fixes#23739.
* backport of the timers from Akka Typed, #16742
* also fixed a small bug in FSM timers, which could result in that
a timer from a previous incarnation was let through to new
incarnation after restart
* no more need for the complicated "how to" section in docs of
how to schedule periodic messages