Commit graph

412 commits

Author SHA1 Message Date
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
Konrad Malawski
2ab8ab2840 =21423 remove deprecated PersistentView 2016-12-15 12:31:20 +01:00
ortigali
0eeced1732 Add parameterless constructor to LevelDB journals (#22007)
* add parameterless constructor #22002

* add parameterless constructor #22002

* remove the filter in MiMa.scala #22002

* add LeveldbStore.emptyConfig to use default config #22002
2016-12-14 17:32:38 +01:00
ortigali
ef1e0e01a2 =per Allow persisting events when recovery has completed (#21893)
* be able to persist events that happen during recovery, #21736

* prohibit persiting events during recovery, #21736

* change error message #21736
2016-12-14 13:32:27 +01:00
Patrik Nordwall
57e59c8496 optionally pass plugin conf path to persistence plugins, #19822 2016-12-13 19:37:03 +01:00
ortigali
5b5cf4fc7b dynamic config path for levelDBJournal and localSnapshotStore #21394 2016-12-13 14:04:39 +01:00
Patrik Nordwall
e04444567f Speedup pull request validation
* speedup ActorCreationPerfSpec
* reduce iterations in ConsistencySpec
* tag SupervisorHierarchySpec as LongRunningTest
* various small speedups and tagging in actor-tests
* speedup expectNoMsg in stream-tests
* tag FramingSpec, and reduce iterations
* speedup QueueSourceSpec
* tag some stream-tests
* reduce iterations in persistence.PerformanceSpec
* reduce iterations in some cluster perf tests
* tag RemoteWatcherSpec
* tag InterpreterStressSpec
* remove LongRunning from ClusterConsistentHashingRouterSpec
* sys property to disable multi-jvm tests in test
* actually disable multi-node tests in validatePullRequest
* doc sbt flags in CONTRIBUTING
2016-11-30 14:31:06 +01:00
Patrik Nordwall
ea84b4bfdd add LoadSnapshotFailed in snapshot protocol, #21842
* treat snapshot load failure in same way as other recovery failures
* if load of snapshot fails the persistent actor will be stopped, since
  we can't assume that a consistent state would be recovered just by
  replaying all events, since events may have been  deleted
* additional recovery docs
* improve log message
2016-11-18 10:51:35 +01:00
Wojciech Grajewski
bca7045174 =per #20821 optimize recovering from snapshot in LocalSnapshotStore (#21827)
* optimize recovering from snapshot in LocalSnapshotStore #20821

* replaced FilenamePattern regex with String operations when scanning snapshot filenames

* further optimization of the string operations

* fixed the logic in order to pass the SnapshotRecoveryLocalStoreSpec test
2016-11-18 10:15:30 +01:00
Konrad Malawski
5df1cc52b0 Remove not needed type match in last clause in EventSourced 2016-11-17 14:11:34 +01:00
Nafer Sanabria
80d48ead5a per bugfix #21824 pass the message which cause restart in PersistentActor 2016-11-17 14:11:34 +01:00
Patrik Nordwall
679db55eca increase test timeout in PersistentFSMSpec, #20725 (#21694)
* and add remainingOrDefault in Java testkit
2016-10-21 16:50:44 +02:00
Patrik Nordwall
3c8edee26a harden AtLeastOnceDeliverySpec, #20724 (#21695)
* the reason for the failure was unexpected redelivery because
  the too short 1 second redelivery interval
2016-10-19 10:13:01 +02:00
Nafer Sanabria
0b9a5026a0 Remove unnecesary s when printing unit times (#21637) 2016-10-13 12:35:20 +02:00
Patrik Nordwall
4a7cd14731 Merge pull request #21429 from richard-imaoka/wip-20394-dupe-persistentid-errmsg-richard-imaoka
More descriptive errors from ReplayFilter
2016-09-13 16:11:59 +02:00