Commit graph

1955 commits

Author SHA1 Message Date
Arnout Engelen
38cda5147f Fix race conditions in Artery TCP binding to 0 (#27456) 2019-08-06 06:21:28 -07:00
Christopher Batey
e55ac350c3
Fix race in AkkaProtocolSpec (#27431)
The heartbeat happens after the send associate in
AkkaProtocolTransport so test can't assume the heartbeat
has happened.

Fixes #26974
2019-07-31 09:05:58 +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
Helena Edelson
96abaf2168 Add clarification to doc on cluster cross boundary use of DeathWatch (#27385)
* Add clarification to doc on cluster cross boundary use of DeathWatch #27376

* Clarrified reasoning and behavior update, and updated warning config name to same convention.
2019-07-25 14:12:57 +02:00
Arnout Engelen
6d4fbfc43d Loosen expectation of TlsTcpWithHostnameVerificationSpec (#27394) (#27396) 2019-07-24 08:34:25 +01:00
Christopher Batey
6c416c2818 User serializer for protobuf3 (#27362)
* User serializer for protobuf3
2019-07-23 16:22:07 +02:00
Arnout Engelen
c3e8a968d9
Test hostname verification (#27355) 2019-07-16 15:32:50 +02:00
Christopher Batey
d2f5d2daa3 Allow java serialization for TypedActorRemoteDeploySpec (#27354)
* Allow java serialization for TypedActorRemoteDeploySpec

* Also delete ignore for 2.12 annotation
2019-07-15 14:00:34 +02:00
rohitkumbhar
50b63464fa Hostname verification should be done by the client only (#26906)
Setting the endpoint identification algorithm to HTTPS on the server engine
forces the client to preset a certificate that contains the server name. This
is rather unlikely and it fails TLS handshake today

This change will allow hostname verification to be done by the client only
2019-07-15 13:43:50 +02:00
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
Patrik Nordwall
e5dbd939be
Merge pull request #27256 from akka/wip-26684-additional-bindings-patriknw
Remove additional-serialization-bindings, #26684
2019-07-10 12:14:37 +02:00
Arnout Engelen
47c65d266a Don't WARN when the user explicitly enabled unsafe features (#27289) 2019-07-05 18:25:35 +01:00
Patrik Nordwall
3f4179c316 Remove additional-serialization-bindings, #26684
This should be safe for a rolling update between Akka 2.5.x and 2.6.0
also if additional-bindings were disabled in 2.5.x because:
* if 2.6.0 sends one of those the serializer (akka-misc) exists in 2.5.x
  so deserialization will work via the serializerId
* if 2.5.x sends one of those with java serialization it can be
  deserialized in 2.6.0 since the java serializer exists
  (disabling java serialization by default is another ticket)

* historical problems with serialization of remote Deploy messages
  in Akka 2.4.x should be gone now
2019-07-05 13:12:36 +02:00
Patrik Nordwall
16f2009786 fix two log messages related to use-unsafe-remote-features-without-cluster (#27241)
* one was always logged at startup when using cluster provider
* the other was logged (at debug) each time an ordinary local actor was started
2019-07-05 08:11:33 +01:00
Patrik Nordwall
f9d76aa030
Log Dropped from DeadLetterListener, #26432 (#27160)
* Log Dropped from DeadLetterListener, #26432

* Move Dropped from akka-actor-typed to akka-actor
* Use it in Artery
* Use in right way from GroupRouter, not via deadLetters
* Remove "without sender" in log message from DeadLetterListener,
  since there is no sender in Typed
* mima filter
* add sender to Dropped
2019-07-04 14:52:42 +02:00
Helena Edelson
cc430fe4d0
Fixed test tagged as IgnoreForScala212 ran in nightly not hit in other CI jobs, just needed the new akka.remote.use-unsafe-remote-features-without-cluster = on. (#27202) 2019-06-22 08:29:03 -07:00
Helena Edelson
611e32de91 Disable remote watch and remote deployment outside Cluster (#27126) 2019-06-21 14:15:36 +02:00
Johan Andrén
44043447d1 Some old netty config paths in tests fixed (#27159) 2019-06-18 10:20:06 +02:00
Patrik Nordwall
af525fd82a
Make Artery connect failure logging less verbose, #26865 (#27073)
* silence "Restarting graph due to failure" logging by RestartFlow, #26865
* only log first error in connectionFlowWithRestart as warning and then debug
* avoid double logging of connection refused
* mima
2019-06-14 11:17:16 +02:00
Christopher Batey
fd1acb9326 Upgrade to Aeron 1.19.1 (#27043)
* Upgrade to Aeron 1.19.1

No mention of on the wire incompatibilities in release notes for
versions 1.15->1.19

* fix compilation issue with new aeron

* Set default publication unblock timeout to 40s

This needs to be bigger than the liveness timeout. Aeron
defaults these to 5seconds and 10seconds. Akka uses 20s
for the liveness so use 40s for the unblock to keep the same
relation between the properties as Aeron has.

* Add publication unblock timeout in sharedmedia driver

* Update akka-remote/src/main/scala/akka/remote/artery/ArterySettings.scala

Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-06-13 21:44:29 +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
e7e628c831 Internal stable markers
A marker on a class means that its name shouldn't change, if any of its
methods should not change they will be marked as well
2019-05-31 14:15:09 +01:00
Christopher Batey
e855db8825
Harden RemotingSpec: Retry if address is taken (#26795)
* Harden RemotingSpec: Retry if address is taken

The test requires that the ActorSystem not be started when doing the
selection to using port = 0 is not an option.

Fixes #25657
2019-05-30 10:59:01 +01:00
Christopher Batey
96eed177dc
Make netty and aeron dependencies optional (#27017)
* Make netty and aeron dependencies optional
* Include agrona as a mandatory dependency (used in compression tables)
Refs #25169
2019-05-29 09:50:28 +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
Patrik Nordwall
0458b5624d
Merge pull request #26980 from helena/deprecate-actor-typedactor
Deprecate akka.actor.TypedActor #25516
2019-05-21 21:06:23 +02:00
Helena Edelson
593f9501b5 * Deprecate akka.actor.TypedActor #25516 2019-05-21 10:38:38 -04:00
Patrik Nordwall
3e32cdc3ca fix ByteStringSpec for Scala 2.13, #26956
* simply ignore that compat test for 2.13 because the only reason for
  testing Java serialization compat is that in Akka 2.4 it used
  Java serialization (and in 2.5 when additional-serialization-bindings
  was disabled)
2019-05-20 12:07:27 +02: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
Patrik Nordwall
a2658cc8a0
Merge pull request #26933 from akka/wip-ClusterSingletonProxySpec-patriknw
more classic remoting leftovers
2019-05-17 11:07:29 +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
71e9bdc262 more classic remoting leftovers
* fix several tests that were using akka.remote.netty.tcp config
* replace akka.tcp with akka in more places
* some doc cross references to remoting.md
2019-05-15 19:34:50 +02:00
Arnout Engelen
1852649d0d Determine temporary ports with SocketUtils #23337 2019-05-14 09:25:16 +02:00
Helena Edelson
4bd40be864
Promote ApiMayChange features #26532 (#26838) 2019-05-07 07:01:59 -07:00
Patrik Nordwall
4e5c8fe626
ResetSystemMessageSeqNrSpec should not run with classic remoting, #26849 (#26856)
* ResetSystemMessageSeqNrSpec should not run with classic remoting, #26849
* Jenkins job overrides config with -Dakka.remote.artery.enabled=off
* use Scalatest withFixture
2019-05-06 11:08:57 +02:00
Johan Andrén
81b1e2ef9b Internal dispatcher to protect against starvation (#26816)
* Allow for dispatcher aliases and define a internal dispatcher
* Test checking dispatcher name
* MiMa for Dispatchers
* Migration guide entry
* No need to have custom dispatcher lookup logic in streams anymore
* Default dispatcher size and migration note about that
* Test checking exact config values...
* Typed receptionist on internal dispatcher
* All internal usages of system.dispatcher gone through
2019-05-02 22:35:25 +02:00
Patrik Nordwall
14de568570 Remove remainings of actorFor, #26190
* remove undefinedUid specials related to actorFor
* mention in migration guide
* remove special case for watch of undefinedUid
2019-05-02 19:17:40 +02:00
Christopher Batey
efc3adc08d
Make artery the default remoting (#26772) 2019-05-01 08:12:09 +01:00
Arnout Engelen
f17941d614 Move 'Remoting' under 'Clustering' in the docs (#26774)
* Move 'Remoting' under 'Clustering' in the docs #26491

* As it is typically not used directly, but as an implementation detail of
Clustering.

* Warn when remoting is used directly #26491
2019-04-29 13:18:03 +02:00
Martynas Mickevičius
2184a617a3 Drop MiMa filters for 2.4.x (#26781) 2019-04-23 09:24:29 +02:00
Christopher Batey
0ab7a96ae2
Remove Scala 2.11 for Akka 2.6 (#26760)
* Remove Scala 2.11 for Akka 2.6

* Remove unused import

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Remove last few bits of 2.11
2019-04-19 07:53:27 +01:00
Arnout Engelen
e390f1397b
Fix warnings in akka-remote (#26735) 2019-04-16 20:26:09 +02:00
Arnout Engelen
6207484c0e
Review follow ups for PR #26653 (#26668)
* Review follow ups for PR #26653

* Internal marker for error messages
2019-04-05 11:04:32 +02:00
Arnout Engelen
76479b8770
[not for merge] Warnings as errors in akka-actor (#26634)
Warnings as errors in akka-actor
2019-04-03 13:13:44 +02:00
Christopher Batey
fbcb8c9f33 Review follow ups for PR #26653 2019-04-03 07:32:38 +01:00
Patrik Nordwall
a8741a696d Notice too long quarantine-after-silence config value #26512 2019-03-19 08:13:51 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00