Commit graph

376 commits

Author SHA1 Message Date
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
Patrik Nordwall
26243a1af7 Merge pull request #23074 from mizerlou/persistent-fsm-state-name-extractor
PersistentFSM.StateChangeEvent extractor
2017-06-19 13:51:37 +02:00
Richard Imaoka
2ec2d98888 Use snapshot-after in config for periodical snapshots in PersistentFSM (#22605)
* Use snapshot-after in config to periodical snapshot in PersistentFSM (#21563)

* akka.persistence.fsm.snapshot-after is either off or a numerical value

* Use Akka Extension for snapshot-after in PersistentFSM
2017-06-16 14:47:00 +02:00
lantz moore
b4b1e8d7ec made StateChangeEvent public. fixes #23072 2017-06-12 00:59:00 -07:00
Konrad `ktoso` Malawski
1f63ebf911 =per #23042 Recover.none should immediately carry None snapshot crit (#23043)
* =per #23042 Recover.none should immediately carry None snapshot crit

* Update migration-guide-2.4.x-2.5.x.md
2017-05-29 16:04:43 +02:00
Hawstein
2449aeeb14 =per Optimize highestSequenceNr method in AtomicWrite (#23059)
* optimize highestSequenceNr method in AtomicWrite

* Use Long instead of Option[Long]
2017-05-29 15:24:56 +02:00
Konrad `ktoso` Malawski
f459b28289 =format remove whitespace causing formatting trouble (#23060) 2017-05-29 12:49:32 +02:00
Pepe García
398c944693 fix scaladoc in PersistentFSMBase #23056 (#23057) 2017-05-29 11:19:40 +02:00
Patrik Nordwall
c385f163d9 Limit number of concurrent PersistentActor recoveries, #22638 (#22641)
When starting many persistent actors at the same time the journal
its data store is protected from being overloaded by limiting number
of recoveries that can be in progress at the same time.

(cherry picked from commit afc9df17a7faf2a239598788ff48f3bf2cd7b605)
2017-04-24 18:04:13 +02:00
Patrik Nordwall
de27c18469 Replace FileInputStream and FileOutputStream, #22733
(because they use finalize that is not gc friendly)
2017-04-19 12:05:19 -05:00
Richard Imaoka
e82d2c2817 Update deferAsync doc #20873 2017-03-30 11:34:09 +02:00
Björn Antonsson
f8b4fb55ca Remove use of deprecated Scala features #22581 2017-03-27 19:05:54 +03:00
ortigali
363ca39f52 AbstractPersistentFSM should have getContext, getSelf, getSender #22541 2017-03-17 09:27:15 +01:00
Hawstein
6434cbe868 Re-implement javadsl testkit (#22240)
* re-implement javadsl testkit

* fix mima problem

* rebase master

* move ImplicitSender/DefaultTimeout to scaladsl

* undo the change of moving scala api

* fix return type and add doc

* resolve conflicts and add more comments
2017-03-16 20:02:47 +01:00
Johan Andrén
7a0e5b31f8 Avoid Array.ofDim where possible #22516 2017-03-13 17:49:45 +01:00
ortigali
b93d7341e3 Remove backwards compatible workaround in SnapshotSerializer? (#22231)
* Remove backwards compatible workaround in SnapshotSerializer? #16197

* add mima missing entries #16197

* add test that verifies read/write snapshot compatibility with 2.4 akka version #16197
2017-02-24 10:34:20 +01:00
Patrik Nordwall
ed765f612c Merge pull request #22022 from IanGrima/patch-1
PersistentFSMBase - matchEvent API bug fix
2017-02-21 14:51:08 +01:00
Patrik Nordwall
37f4436a39 Merge pull request #22349 from hseeberger/22342-dependency-configurations
Fix configuration for persistence-query test deps (fix #22342)
2017-02-21 13:23:53 +01:00
Patrik Nordwall
b3b6dc37fc Merge pull request #22232 from ortigali/wip-22052-PersistentActorSpec-2
customise test for race between GetState and persistAsync handler
2017-02-21 12:58:12 +01:00
Heiko Seeberger
78022732b9 Fix configuration for persistence-query test deps (fix #22342) 2017-02-21 12:24:26 +01:00
Johan Andrén
8b5018ba21 Fix AbstractPersistentActor ambiguity with Scala 2.12 #22218 2017-02-20 14:50:25 +01:00
Johan Andrén
cf6d5a4e8a Deprecation of ExtensionKey #22208 2017-02-17 17:07:15 +01:00
Patrik Nordwall
471311d947 Merge pull request #22137 from by-dam/wrap-CombinedReadEventAdapter-into-NoopWriteEventAdapter
#22136 - Wraps CombinedReadEventAdapter into NoopWriteEventAdapter
2017-02-10 11:09:08 +01:00
ortigali
5ee25d9d40 customise test for race between GetState and persistAsync handler #22052 2017-01-26 19:11:08 +05:00
Patrik Nordwall
94e40460a4 Merge pull request #22206 from akka/wip-21423-remove-deprecations-patriknw
remove deprecations, #21423
2017-01-24 16:45:31 +01:00
Patrik Nordwall
a9198880ce remove deprecated persist method, #21423
* superseded by persistAll
2017-01-24 13:35:51 +01:00
Patrik Nordwall
99be3cb7b5 Promote PersistenceFSM, #21190 2017-01-24 11:21:37 +01:00
Patrik Nordwall
4bd6b7aab1 improve AbstractActor, #21717
* Receive class that wraps PartialFunction, to avoid
  scary scala types
* move AbstractActorContext to AbstractActor.ActorContext
* converting docs, many, many UntypedActor
* removing UntypedActor docs
* add unit test for ReceiveBuilder
* MiMa filters
* consistent use of getContext(), self(), sender()
* rename cross references
* migration guide
* skip samples for now
* improve match type safetyi, add matchUnchecked
  * the `? extends P` caused code like this to compile:
    `match(String.class, (Integer i) -> {})`
  * added matchUnchecked, since it can still be useful (um, convenient)
    to be able to do:
    `matchUnchecked(List.class, (List<String> list) -> {})`
* eleminate some scala.Option
  * preRestart
  * findChild
  * ActorIdentity.getActorRef
2017-01-23 18:30:52 +01:00
Johan Andrén
c384f948ae timeout cancelation in PersistentFSM #22166 2017-01-23 16:29:12 +01:00
Patrik Nordwall
8083c0bf4a use exclusive fromSequenceNumber in eventsByTag, #22145
* The reason is to have a consistent approach for Sequence and
  TimeBasedUUID, which are both intended as unique event identifiers.
* This means that you can use the offset that is returned in `EventEnvelope`
  as the `offset` parameter in a subsequent query.
2017-01-16 11:43:47 +01:00
Damien Bailly
2aaee675a6 Wraps CombinedReadEventAdapter into NoopWriteEventAdapter
When multiple event-adapters are configured they are combined into a single instance of `CombinedReadEventAdapter`.

However `CombinedReadEventAdpater` is not just a `ReadEventAdapter` but a full `EventAdapter`
which throws an `IllegalStateException("CombinedReadEventAdapter must not be used when writing (creating manifests) events!")`
when its `toJournal` method is called.

The `CombinedReadEventAdapter` is not wrapped into `NoopWriteEventAdapter` (because it's not a `ReadEventAdapter`)
and therefore it doesn't avoid the `toJournal` calls.

This is especially problematic when multiple `ReadEventAdapter` are combined together as illustrated in the new testcase.
2017-01-12 14:35:01 +00:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
Patrik Nordwall
7646506af0 Merge pull request #22020 from akka/wip-catch-deserialization-patriknw
catch NotSerializableException from deserialization, #20641
2017-01-02 16:00:06 +01:00
Patrik Nordwall
e494ec2183 catch NotSerializableException from deserialization, #20641
* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending
2016-12-16 20:14:37 +01:00
Patrik Nordwall
798a673e97 Merge pull request #22000 from akka/wip-19822-persistence-conf-path-patriknw
optionally pass plugin conf path to persistence plugins, #19822
2016-12-16 17:50:58 +01:00
Johan "Party Cannon" Andrén
3fe131652f Fail fast on null persistenceId in PersistentActor #22025 2016-12-16 16:54:53 +01:00
IanGrima
80019db016 PersistentFSMBase - matchEvent API bug fix
Parameter "predicate" not being propagated to created builder.
2016-12-16 12:40:57 +01:00