Commit graph

714 commits

Author SHA1 Message Date
Christopher Batey
e3164916ad Deprecate PersistentFSM
Refs #26490
2019-08-15 11:17:40 +02:00
Christopher Batey
a2ecd915cb
Remove extensions to protobuf config checker messages (#27400)
* Remove extensions to protobuf config checker messages

AFAICT these are never serialized/deserialized. Removing as they use a
deprecated feature of protobuf (required fields in extensions)
* Remove extensions from protobuf
2019-08-02 09:16:57 +01:00
Christopher Batey
89e269d5d8 Remove catchall silents from prod code (#27432)
* WIP

* Remove catch all silent annocations from prod code
2019-07-30 11:12:23 +02:00
Christopher Batey
e188b1f653 Migration guide for Persistent FSM to typed persistence (#27336) 2019-07-26 10:01:11 +02:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
  from akka-remote to akka-actor since they had no dependency
  and are useful also in local systems, e.g. persistence.
  * e.g. needed for persistence-tck
  * less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
  but misconfigured
* Made tests pass
  * allow-java-serialization=on in akka-persistence
  * allow-java-serialization=on in classic remoting tests
  * JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
  * Boolean
  * java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
  * Effect() is factory in EventSourcedBehavior  class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
  * fallback to akka.remote.serialization.ThrowableNotSerializableException
    if exception is not serializable when wrapped in system messages from
    remote deployed child actors and Status.Failure messages
  * it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
  improving or removing that feature
* migration guide, including description of rolling update

* fix 2.13 compiler error

* minor review feedback
2019-07-11 14:04:24 +02:00
Christopher Batey
2db03309ce
Akka Persistence instrumentation improvements (#26946) (#27280) 2019-07-05 10:06:07 +01:00
Patrik Nordwall
72680e93bf EventSeq in Typed EventAdapter (#27130)
EventSeq in Typed EventAdapter, refs #26909
2019-07-05 09:46:10 +02:00
Patrik Nordwall
10d32fceb9 scheduleWithFixedDelay vs scheduleAtFixedRate, #26910
* previous `schedule` method is trying to maintain a fixed average frequency
  over time, but that can result in undesired bursts of scheduled tasks after a long
  GC or if the JVM process has been suspended, same with all other periodic
  scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
  depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
  and `scheduleAtFixedRate`, when fixing the deprecation warning users should
  make a concious decision of which behavior to use (scheduleWithFixedDelay in
  most cases)

* Streams
* SchedulerSpec
  * test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
2019-06-05 11:38:04 +02:00
Christopher Batey
c46a75247a Upgrade scalafmt 2019-05-29 10:20:45 +01:00
Christopher Batey
e7672a9802
Remove various features deprecated since 2.5.0 (#27023)
* Remove various features deprecated since 2.5.0
2019-05-29 07:10:40 +01:00
Christopher Batey
28fbd28e7a
Various internal stable markers (#27004) 2019-05-29 07:09:12 +01:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Christopher Batey
138ffe25d7
Hooks for Akka Persistence Typed lifecycle (#26999) 2019-05-23 15:10:32 +01:00
Dale Wijnand
03c4efdc1d Rewrite some code for Scala 2.13 (#26944)
* Rewrite some code for Scala 2.13

Rewrote some code to avoid some deprecations coming in 2.13.

* Drop usage of scala.Symbol in the tests
2019-05-20 08:59:49 +02:00
Arnaud Burlet
e6be88d35f Gracefully handle exception throw in SnapshotOffer, #26699 (#26700) 2019-05-17 10:47:10 +02:00
Arnout Engelen
dae1870a10
persistentId -> persistenceId 2019-05-14 14:06:55 +02:00
Martynas Mickevičius
2184a617a3 Drop MiMa filters for 2.4.x (#26781) 2019-04-23 09:24:29 +02:00
Johan Andrén
38e63a0e41 akka-persistence compiler warnings as fatal errors (#26654) 2019-04-05 14:43:23 +02:00
Patrik Nordwall
646e68416d
Merge pull request #26568 from akka/updateScalaTest
Update scalatest to 3.0.7
2019-03-26 15:09:23 +01:00
Patrik Nordwall
aff69033d5
Merge pull request #26538 from akka/wip-24687-more-persistence-tests5-patriknw
add tests for missing journal and snapshot plugin config, #24687
2019-03-25 13:41:22 +01:00
Patrik Nordwall
1a463ab248
Merge pull request #26583 from akka/wip-26580-npe-snapshotstore-patriknw
fix NPE in SnapshotStore, #26580
2019-03-25 12:01:57 +01:00
Patrik Nordwall
9d74ad11e4 add tests for missing journal and snapshot plugin config, #24687
* extract validation of persistence plugin config
  * The reason for the duplicate check in EventSourcedSettings
    is for better user experience. Fail fast before the actor is
    started.
  * The checks must still also be done when plugin is loaded, since
    that is what is used by untyped.
  * Extracted into static utility methods in Persistence
2019-03-25 11:59:19 +01:00
Helena Edelson
48b0865141 Test update on params per issue suggestion, and a few minor untyped test deprecation/warning fixes. 2019-03-21 14:01:35 -07:00
Patrik Nordwall
f8be7ddb6f
Merge pull request #26521 from akka/wip-24687-more-persistence-tests-patriknw
a few more persistence tests from PersistentActorSpec, #24687
2019-03-20 14:40:21 +01:00
Patrik Nordwall
610a89c2d0 fix NPE in SnapshotStore, #26580
* access of context.system from Future callback
* also changed import context.dispatcher, shouldn't be needed but
  rather safe than sorry
2019-03-20 13:10:52 +01:00
Arnout Engelen
b214115051
Update scalatest 2019-03-19 11:25:48 +01:00
Helena Edelson
d358a0c3b5 Typed Persistence: deleting snapshots / events #24698 2019-03-18 13:22:52 +01:00
Patrik Nordwall
0c65635cbd a few more persistence tests from PersistentActorSpec, #24687 2019-03-15 12:46:55 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
0f40491d42 manual adjustments before scalafmt
* fix formatting error

* reversePrepend instead of reverse_:::
  * because it is causing trouble for AvoidInfix formatting

* prepare for AvoidInfix

* fix try-catch
2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Helena Edelson
27957649e8
Consolidate duplicate persistence sharding function #26451 (#26452) 2019-03-05 08:05:51 -05:00
Helena Edelson
7e31974192 Fixing minor wrapping. 2019-03-01 10:27:48 -08:00
Seth Tisue
fc23f03031 upgrade to latest ScalaTest (#26387)
stuff moved to a new package. you wouldn't expect that in a point
release, but they put type aliases in place so Scala users wouldn't
notice. but the change is visible to Java code.

the upgrade is not strictly necessary, but it would be convenient
for the Scala 2.13 community build to have this merged, so I don't
have to maintain these changes in our Akka fork
2019-02-17 19:45:39 +00:00
Patrik Nordwall
b06b9e7442 optimize AtLeastOnceDelivery by not scheduling ticks when not needed, #26216
* when there are no pending unconfirmed messages the redelivery tick
  is not needed
* before the change 100k idle actors used around 25% CPU on my machine
* dropped to almost 0% after the change (ofc)
* not using Timers API because that would not be binary compatible
2019-01-15 13:42:17 +01:00
hepin1989
998c5a9285 Formatting java codes with sbt-java-formatter. 2019-01-12 04:00:53 +08:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
Helena Edelson
dbfe6f38c7 Rename PersistentBehavior (#25721)
Migrated InternalProtocol with least refactor changes, in the end.
2018-12-05 12:05:59 +01:00
kerr
e9fb3a020a Make use of scalafix to remove unused import. (#26019)
* =build Add scalafix to remote unused import.

* +build Add file ignore plugin for scalafix which support ignore files.
2018-12-05 08:30:21 +00:00
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