Commit graph

412 commits

Author SHA1 Message Date
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Christopher Batey
9cafeda344
Add inclusive to deletion api docs (#25390) 2018-08-23 09:13:53 +01:00
Kazuhiro Sera
482eaea122 Fix several minor typos detected by github.com/client9/misspell (#25448)
* Fix several minor typos detected by github.com/client9/misspell

* Revert s/erminater/erminator/ in /ActorSystemSpec
2018-08-21 11:02:37 +09:00
Patrik Nordwall
9e66f7121f Enforce valid seqnr for deletes, #25487 (#25488) 2018-08-20 15:14:56 +09:00
kenji yoshida
5b3b191bac Remove procedure syntax (#25362) 2018-07-25 13:38:27 +02:00
Patrik Nordwall
90d589ec43 Optimized recovery #25072
* 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
2018-07-11 10:07:31 +02:00
Guy Youansi
a4951e0ce7 Java time duration support for javadsl #24646
java.time.Duration support in all jdocs java file, the persistence module and the distributed-data
2018-06-26 15:41:30 +02:00
Jimin Hsieh
7c3a8a8ed5 java.time.Duration APIs in javadsl.TestKit #24646 2018-05-29 12:17:48 +02:00
Patrik Nordwall
e6633f17fa
Make sure Serialization.currentTransportInformation is always set, #25067
* 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.
2018-05-21 16:59:04 +02:00
Christopher Batey
9051e2fcda Allow reuse of journal loading logic (#24990)
* 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
2018-04-26 22:00:15 +09:00
Kirill Yankov
3ebb9fa9c1 Fix serialization in TypedActor (#24851)
* fixed serialization in TypedActor
* generalized duplicates via Serialization.manifestFor
2018-04-12 18:58:13 +02:00
mucahitkantepe
e495dab941 AutoReceivedMessage with Timers bug fixed (#24080)
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)
2018-04-12 22:21:12 +09:00
Martynas Mickevičius
63be9b72cb
Fix persistence excludes 2018-04-03 22:55:25 +03:00
Prada Souvanlasy
46c662965f fix #23618 : Support for persistence dynamic configuration at runtime (#23841) 2018-03-26 13:52:31 +02:00
Patrik Nordwall
7d85172295 mima filter for PersistentActor.defer
* was in wrong file when PR was merged
2018-03-25 20:23:06 +02:00
Patrik Nordwall
11f2ef5784
Merge pull request #24508 from psliwa/patch-1-defer-method
Adding defer method to PersistentActor
2018-03-21 13:41:51 +01:00
Jimin Hsieh
3685ce619e Remove some of Unused import warning (#24750)
* Remove `Unused import` of `akka-actor-typed`

* Remove `Unused import` of `akka-actor-typed-tests`

* Remove `Unused import` of `akka-stream-tests`

* Remove `Unused import` of `akka-persistence`

* Remove `Unused import` of `akka-persistence-typed`

* Remove `Unused import` of `akka-cluster-typed`

* Remove `Unused import` of `akka-cluster-sharding-typed`

* Format source code
2018-03-20 12:01:15 +09:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Konrad Malawski
5be89dea71 cleanup and make snapshots work, make event timeout work too
sadly does not work without MODULE$ did a ticket for it
2018-03-13 00:40:13 +09:00
Konrad Malawski
70e225b734 =per native typed implementation of Eventsourced=>PersistendBehavior
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
2018-03-13 00:40:13 +09:00
kerr
97ca714d17 = all remove semicolons "bye-bye semicolon" (#24659) 2018-03-06 09:53:28 +09:00
Filip
cdc0fd3e3d Avoid infinite recursion in AbstractPersistentFSM, #24448 2018-02-23 10:50:32 +01:00
ryota-sakamoto
6fa74789ce Exception from receiveRecover should stop the PersistentActor #24192 2018-02-21 17:20:52 +01:00
piotr.sliwa
2f6deace13 Adding defer method to PersistentActor 2018-02-20 23:30:56 +01:00
Christopher Batey
c5c81dc018 Add warning about AsyncRecovery assumptions c* plugin makes 2018-02-12 13:21:08 +00:00
Patrik Nordwall
cdecd8b6fe add missing returnRecoveryPermit (#24439)
* 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
2018-01-30 21:46:38 +09:00
Konrad `ktoso` Malawski
682b047ac3 +str #24229 first working SinkRef, though serialization is wrong somehow (when serialize-messages = on)
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
2018-01-23 02:27:10 +09:00
Christopher Batey
accfa21731
Fix race in OptionalSnapshotStoreSpec (#24323)
Subscribe to log events before creating the actor otherwise it might
miss the log message it is testing for

Refs #24144
2018-01-16 15:06:42 +00:00
Denys Zadorozhnyi
f1de21950d Adds stacktrace to the logged warning in onPersistRejected() (#24263)
Fixes #24133: Switch to log.error from log.warning and add a stacktrace in onPersistRejected()
2018-01-11 11:52:38 +01:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Nafer Sanabria
1dffa344c4 Fail fast on empty string persistenceId in PersistentActor (#24239) 2018-01-03 22:22:44 +01:00
Johan Andrén
be3766d0ae
Post 2.5.8 fixes (#24128)
* Update MiMa latest release
* Silence some noise from sbt breaking the relase script
* MiMa excludes we had missed for a couple of releases
2017-12-08 16:53:47 +01:00
ortigali
22e85f869d Calls to stash() inside of persist callbacks should throw exception (#22615) 2017-12-06 07:32:04 +01:00
Patrik Nordwall
11d628d27f enforce right order of Timers and PersistentActor trait, #24076 (#24081)
* the order was also wrong in the AbstractPersistentActorWithTimers
* mima complains about this change for AbstractPersistentActor and
  AbstractPersistentActorWithAtLeastOnceDelivery, but I think it is ok
2017-12-05 14:24:56 +09:00
Patrik Nordwall
60e7a4088d fix double return of recovery permit, #24003
* when exception was thrown from RecoveryCompleted the
  permit was returned twice, resulting in negative balance
2017-11-15 18:16:26 +01:00
Christopher Batey
9c119b321a Improve error message for AbstractPersistentFSMTest failure (#23985)
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)
2017-11-14 21:57:16 +09:00
Niko Will
fe34dd163c
Fix typos in PersistentActor.scala #23962
I found some typos in PersistentActor.scala and fixed them.
2017-11-10 15:26:16 +01:00
Konrad `ktoso` Malawski
e547d2b295
Revert "#23329 PersistentFSM: andThen callbacks are not executed when stay() (#23943)" (#23947)
This reverts commit b19d9860d7.
2017-11-08 18:00:40 +09:00
sovaalexandr
b19d9860d7 #23329 PersistentFSM: andThen callbacks are not executed when stay() (#23943)
* 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
2017-11-08 17:17:41 +09:00
Patrik Nordwall
bcce7bd8c1 fix wrong inheritance of AbstractPersistentLoggingFSM, #23436 (#23831) 2017-10-24 09:57:38 +09:00
Johan Andrén
c581da4e98 Widen within spans downwards in PersistentFSMSpec (#23715)
* Widen within spans downwards in PersistentFSMSpec #23691

* Adjust times instead
2017-10-03 18:51:23 +02:00
Patrik Nordwall
f85a124a17 Merge pull request #23563 from nick-nachos/wip-21677-leveldbJournalCompaction
Added journal compaction behavior for LevelDB #21677
2017-09-28 12:34:18 +02:00
Johannes Rudolph
d2827ef982 =per #23739 deprecate State.using to deter Java users (#23740)
`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.
2017-09-28 10:54:38 +09:00
Patrik Nordwall
5f059d18b5 Add AbstractPersistentActorWithTimers, #23652 (#23653) 2017-09-19 13:04:09 +02:00
Nikos Nakas
341b74e7c1 Added journal compaction behavior for LevelDB #21677 2017-09-18 21:13:02 +00:00
Patrik Nordwall
2b803562f0 avoid unique actor name issue in EndToEndEventAdapterSpec, #23483 (#23520)
* the name of the actor is of no importance
2017-08-22 14:09:45 +02:00
Nicolas Vollmar
1c43059da9 Replay all events if snapshot is unhandled #23469 2017-08-09 17:03:27 +02:00
Sebastian Harko
cc11ed40b5 Persistence: Reference.conf : remove refs to persistent view (#23451) 2017-07-28 09:15:36 +02:00
Martynas Mickevičius
bc0f2ee26d Load MiMa filters from file (#23083) 2017-07-27 12:33:14 +02:00
Patrik Nordwall
f8a1d635fa Support for Actor timers, and fix bug in FSM, #15733
* 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
2017-07-06 14:29:35 +02:00