Commit graph

233 commits

Author SHA1 Message Date
Helena Edelson
a110be8f69
Fix intercept of Watch in use of safe remote features #27333 (#27334)
And added one more case for cluster watcher, watching remote no cluster watchee, and the reverse.
2019-07-12 12:18:37 -07: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
Patrik Nordwall
8d69388d0a Deprecate classic remoting classes (#27237)
* Sprinkle deprecated annotation to public classes for classic remoting
* Use right dispatcher setting for a few remoting actors
* New Artery events for QuarantinedEvent, GracefulShutdownQuarantinedEvent
  and ThisActorSystemQuarantinedEvent because old were not good
  and would cause binary compatibility trouble when we remove classic
* silence more deprecation warnings
2019-07-10 14:26:51 +02:00
Helena Edelson
611e32de91 Disable remote watch and remote deployment outside Cluster (#27126) 2019-06-21 14:15:36 +02:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Patrik Nordwall
35e7e07488
Some more internal-dispatcher usages, #26915
* tried to investigate the (small) increase in LatencySpec that occured
  when the internal-dispatcher was introduced
* couldn't see significant difference when running locally
* found a few more places where the internal-dispatcher should be used
* my thinking is that the additional latency could have been caused by
  hopping between dispatchers, but I'm not sure if any of these
  changes will have an effect (we'll see in Jenkins job)
* more clear router props
2019-05-15 19:35:57 +02:00
Patrik Nordwall
6f7856594a fix changed idle-cpu-level property in LatencySpec (#26872) 2019-05-06 14:19:56 +02:00
Christopher Batey
efc3adc08d
Make artery the default remoting (#26772) 2019-05-01 08:12:09 +01:00
Arnout Engelen
306187046f
Fix multi-node-testkit warnings (#26754) 2019-04-16 20:26:38 +02:00
Patrik Nordwall
e320846f2b Long is not an Int, #26733
* changed when fixing warnings
2019-04-15 15:55:45 +02:00
Christopher Batey
10e525062a Compiler warnings for actor-tests and remote-tests (#26685) 2019-04-15 08:54:16 +00: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
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
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
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
Patrik Nordwall
cea5fbcbf5 update aeron.dir in test (#26031)
* updated sbt probably use a different way of resolving current working directory
2018-12-03 14:10:02 +00:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04: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
Patrik Nordwall
4095aa248b
Merge pull request #24884 from akka/wip-TransportFailSpec-patriknw
harden TransportFailSpec
2018-05-11 08:12:59 +02:00
Christopher Batey
945440a38d
Revert "Look for perf-java-flames on path in MultiJVM perf support" (#25022)
* Revert "Look for perf-java-flames on path in MultiJVM perf support (#25003)"

This reverts commit 3e11092388.
2018-04-30 14:58:33 +01:00
Christopher Batey
3e11092388
Look for perf-java-flames on path in MultiJVM perf support (#25003) 2018-04-30 11:17:48 +01:00
Christopher Batey
a3e52078df Enable header plugin for the MultiJVM configuration (#24974)
Seems when did the changes for 2018 it intro introduced a space in all
after, hence so many changes.
2018-04-25 00:03:55 +09:00
Christopher Batey
4d20b2a660 Reduce size of jenkins logs
Each build is now over 40mb logs.

A lot of DEBUG logging was left on for test failures that have been
fixed. Added an issue # for ones that are still valid or if if it on
as the test verifies debug
2018-04-24 08:49:41 +01:00
Patrik Nordwall
5a9a40bad1 harden TransportFailSpec 2018-04-11 16:27:38 +02:00
kerr
97ca714d17 = all remove semicolons "bye-bye semicolon" (#24659) 2018-03-06 09:53:28 +09:00
Patrik Nordwall
5e80bd97f2 Stop unused Artery outbound streams, #23967
* fix memory leak in SystemMessageDelivery
* initial set of tests for idle outbound associations, credit to mboogerd
* close inbound compression when quarantined, #23967
  * make sure compressions for quarantined are removed in case they are lingering around
  * also means that advertise will not be done for quarantined
  * remove tombstone in InboundCompressions
* simplify async callbacks by using invokeWithFeedback
* compression for old incarnation, #24400
  * it was fixed by the other previous changes
  * also confirmed by running the SimpleClusterApp with TCP
    as described in the ticket
* test with tcp and tls-tcp transport
  * handle the stop signals differently for tcp transport because they
    are converted to StreamTcpException
* cancel timers on shutdown
* share the top-level FR for all Association instances
* use linked queue for control and large streams, less memory usage
* remove quarantined idle Association completely after a configured delay
  * note that shallow Association instances may still lingering in the
    heap because of cached references from RemoteActorRef, which may
    be cached by LruBoundedCache (used by resolve actor ref).
    Those are small, since the queues have been removed, and the cache
    is bounded.
2018-02-21 11:59:18 +01:00
Patrik Nordwall
4dab3252bd Add Artery TCP/TLS transport, #24390
* configurable SSLEngineProvider
* ssl configuration
* add internal outgoingTlsConnectionWithSSLEngine and bindTlsWithSSLEngine in stream Tcp
* TLS tests
* update remote security section in reference documentation
2018-02-20 16:06:16 +01:00
Patrik Nordwall
0d222906f4 Prepare Artery for alternative TCP transport, #24390
* Refactoring to separate the Aeron specific things, ArteryAeronUdpTransport
* move Aeron specific classes to akka.remote.artery.aeron package
* move Version to ArterySettings, and describe strategy for envelope header changes
2018-02-20 16:02:57 +01:00
Patrik Nordwall
1f708550ee harden AeronStreamConsistencySpec, #24190 (#24326)
This test is using the tcp ports assigned from the multi-jvm infra (classic remoting)
for the Aeron udp. Even though tcp and udp ports are independent and same port number
can be used at the same time for tcp and udp there is no guarantee that the udp port
is free just because the tcp port was.
2018-01-16 15:49:28 +00:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Patrik Nordwall
5ebe723e9c fix flow control in FanOutThroughputSpec, #23198 2017-11-14 14:59:07 +01:00
Patrik Nordwall
eefd6869a5 adjust burstSize in FanOutThrougputSpec, #23198 2017-11-14 12:28:27 +01:00
Patrik Nordwall
64669bc55f additional hardening of RemoteReDeploymentSpec, #23838 2017-11-14 11:54:16 +01:00
Patrik Nordwall
68a2b2fa6e mark FanOutThrougputSpec as pending, #23198
* and include right name in the === prints
2017-11-14 08:38:36 +01:00
Patrik Nordwall
6b41c80f9b Simplify Artery remote deployment and make inbound-lanes=4 default, #21422
* DaemonMsgCreate is not a system message. We send it over the control
  stream because remote deployment process depends on message ordering
  for DaemonMsgCreate and Watch messages. That is all good.
* We also send DaemonMsgCreate over the ordinary message stream (all
  outbound lanes) so that the first ordinary message that is sent to
  the ref does not arrive before the actor is created. This is not needed,
  since the retried resolve in the Decoder will take care of that anyway.
* Inbound lanes were not covered, but not needed.
* Then the deduplication of DaemonMsgCreate messages in  RemoteSystemDaemon
  is not needed.
* Added some more tests for these things.
* describe lanes in reference docs
2017-11-11 10:30:39 +01:00
Patrik Nordwall
be8e4b0276
Merge pull request #23562 from akka/wip-23561-harden-hub-restart-patriknw
Harden restart of Artery stream with inbound-lanes > 1, #23561
2017-11-11 10:21:02 +01:00
Patrik Nordwall
df96139712 harden RemoteScatterGatherSpec, #22192 2017-10-31 17:22:16 +01:00
Patrik Nordwall
70f2fc9622 harden RemoteReDeploymentSpec, #20180 (#23867) 2017-10-30 14:47:15 +01:00
Patrik Nordwall
fc75f78468 Harden restart of Artery stream with inbound-lanes > 1, #23561
* When the artery stream with PartitionHub is restarted it can result in that
  some lanes are removed while it is still processing messages, resulting in
  IndexOutOfBoundsException
* Added possibility to drop messages in PartitionHub, which is then used Artery
* Some race conditions in SurviveInboundStreamRestartWithCompressionInFlightSpec
  when using inbound-lanes > 1
* The killSwitch in Artery was supposed to be triggered when one lane failed,
  but since it used Future.sequence that was never triggered unless it was the
  first lane that failed. Changed to firstCompletedOf.
2017-10-24 14:34:39 +02:00
Christopher Batey
70ad537af5 Retry creation of ActorSystem in remoting tests #23481 (#23769)
* Retry creation of ActorSystem in remoting tests #23481

Remoting multi-jvm test rely on setting port = 0 which selects an open
port. This has a race where two of the JVMs open/close the same port
then configure their ActorSystem with it so one of them fails to start
due to the port being in use. This adds a simple retry so another port
is selected.
2017-10-24 14:22:25 +02:00
Christopher Batey
53c07a4f10 Block ActorSystem creation until Artery is bound 2017-10-13 14:05:44 +01:00
Patrik Nordwall
b5c11f189f Better use of Artery lanes for ActorSelection, #23150
* Looked into the alternativies described in the ticket, but
  they were complicated so ended up with simply including the
  uid of the sending system in the hash for selecting inbound
  lane. That should be good enough, until we have any real demand
  for something else.
* This means that different lanes can be used ActorSelection messages
  from different sending systems, i.e. good in a cluster, but same lane
  will be used for all messages originating from the same system.
* Added possibility to run the benchmarks with ActorSelection
* Added ActorSelection to the send consistency test
2017-08-09 17:35:43 +02:00
Patrik Nordwall
537d2c96fe harden RemoteRestartedQuarantinedSpec, #17314
* Seems like the initial message may be dropped in this case,
  we are at-most once after all. See detailed logs in issue.
2017-08-08 14:31:33 +02:00
Jimin Hsieh
f623d10522 Rename addr to address in non-public API #21874 2017-08-08 13:18:56 +02:00
Arnout Engelen
a01eea8f25 Add some logging to track down #20180 2017-07-24 23:53:33 +09:00
Patrik Nordwall
5ad217b338 debug logging in RemoteRestartedQuarantinedSpec, #17314 (#23237) 2017-06-26 23:51:49 -07:00
Patrik Nordwall
8fcb8efe81 marking as pending, #23198 2017-06-19 13:48:52 +02:00
Patrik Nordwall
4b38b056cc adjust number of messages in FanInThrougputSpec and FanOutThrougputSpec
* some of the tests took too long in the nightly runs
2017-06-19 13:20:24 +02:00