Commit graph

1907 commits

Author SHA1 Message Date
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
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
Johan Andrén
59cae4d07b
Better logging on artery start when bind address used 2019-03-07 14:58:09 +01:00
Yoel García Díaz
3605aff283 output UID only once for bind and local addresses 2019-03-07 12:33:35 +00:00
Yoel Garcia Diaz
85ac56d20c formatting 2019-03-07 10:13:54 +00:00
Yoel Garcia Diaz
639e2a5ae3 single log statement
interpolation made sense here because log.info supports a max of 4 args
2019-03-07 08:34:53 +00:00
Yoel Garcia Diaz
f241e1b860 spelling 2019-03-07 08:29:28 +00:00
Yoel Garcia Diaz
59aaf0a529 spelling 2019-03-07 08:07:38 +00:00
Yoel Garcia Diaz
b2fcc9f1b0 log both listening and binding addresses if they are different 2019-03-07 08:03:39 +00:00
Yoel Garcia Diaz
9e16c02b0d fix login the bind address when remoting starts 2019-03-07 06:58:28 +00:00
Gaël Bréard
a04479ff54 Add marker support in logging filters #26544
Signed-off-by: Gaël Bréard <gael.breard@orange.com>
2019-03-04 11:24:19 +01:00
Patrik Nordwall
0545086a7b
Merge pull request #26333 from chbatey/log-ref-uid-on-watch
Log ActorRef rather than just path for watch/unwatch
2019-02-06 13:37:32 +01:00
Christopher Batey
d91f487358 Log ActorRef rather than just path for watch/unwatch 2019-02-05 15:37:35 +00: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
Christopher Batey
f18399823a
Artery tests: use config to determine TCP/UDP free port + use the correct host (#26211)
* Harden RemoteConnectionSpec

* Select a free port on the same interface for the second actor system
rather than the random one

* Use config to determine tcp/udp for free port in Artery tests
2019-01-08 14:07:13 +00: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
408fab3313
Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)
Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)
2018-12-20 09:10:54 -08:00
hepin1989
c38a5dcf9c Run scalafix to remove unused imports again. 2018-12-17 21:10:11 +08: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
Christopher Batey
af38a1eefd
Harden NettyTransportSpec (#25500)
* Harden NettyTransportSpec

Keep the temporary port open while the ActorSystem is created so it
can't select the same port to bind on.

Fixes #25479
2018-12-04 15:59:54 +00:00
Patrik Nordwall
fe2e5cb5a8 Runtime check that Netty version is 3.10.6, #25967
* Fail fast if invalid Netty version is used.
* Issue netty/netty#4739 may cause messages to not be delivered.
2018-12-04 15:37:04 +01:00
Patrik Nordwall
2f76b1a074
Merge pull request #26037 from chbatey/log-frame-size-exceeding-broken
Parse akka.remote.log-frame-size-exceeding as bytes
2018-12-04 12:20:26 +01:00
Christopher Batey
3acc50feb4 Parse akka.remote.log-frame-size-exceeding as bytes
Missed in PR validation as only used in multi jvm tests
2018-12-04 09:20:29 +00:00
Patrik Nordwall
00d869724a Remove Deprecated CounterSecureRNG, #25978 (#25979) 2018-12-04 09:50:37 +01:00
Daniel Bimschas
f18a00e4d8 Log a warning if 'akka.remote.log-frame-size-exceeding' contains a bad value (#25284)
* Log a warning if 'akka.remote.log-frame-size-exceeding' contains a bad value

Currently, if 'akka.remote.log-frame-size-exceeding' is accidentally set
to an invalid value (e.g. 'on') the developer does not get warned but
remote communication fails with a not-very-helpful error message:

```
[INFO] [06/29/2018 15:07:41.657] [run-main-0] [akka.remote.Remoting] Starting remoting
[INFO] [06/29/2018 15:07:41.847] [run-main-0] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://akkaremotenull@localhost:2553]
[INFO] [06/29/2018 15:07:41.849] [run-main-0] [akka.remote.Remoting] Remoting now listens on addresses: [akka.tcp://akkaremotenull@localhost:2553]
[WARN] [06/29/2018 15:07:41.986] [akkaremotenull-akka.remote.default-remote-dispatcher-5] [akka.tcp://akkaremotenull@localhost:2553/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0] Association with remote system [akka.tcp://akkaremotenull@localhost:2552] has failed, address is now gated for [5000] ms. Reason: [akka://akkaremotenull/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0/endpointWriter: exception during creation] Caused by: [null]
[INFO] [06/29/2018 15:07:41.993] [akkaremotenull-akka.actor.default-dispatcher-3] [akka://akkaremotenull/deadLetters] Message [io.ino.akkaremotenull.Greeter$Greet] from Actor[akka://akkaremotenull/temp/$a] to Actor[akka://akkaremotenull/deadLetters] was not delivered. [1] dead letters encountered. If this is not an expected behavior, then [Actor[akka://akkaremotenull/deadLetters]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
```

This commit fixes the issue by a) printing a warning message and b)
ignoring the config setting.

* Adress review comments

Allows value 'off' for 'akka.remote.log-frame-size-exceeding' to be more
tolerant and now logs the original error message of the ConfigException
caught when parsing an invalid value:

```
[WARN] [07/05/2018 09:13:19.544] [akkaremotenull-akka.remote.default-remote-dispatcher-13] [RemoteMetricsOn(akka://akkaremotenull)] application.conf @ file:/Users/danbim/coding/akka-remote-null/target/scala-2.12/classes/application.conf: 19: Invalid value at 'akka.remote.log-frame-size-exceeding': No number in size-in-bytes value 'test'. For reference, check https://github.com/lightbend/config/blob/master/HOCON.md
```

* Check logFrameSizeExceeding against Int.MaxValue to allow JIT optimizations

* Load 'akka.remote.log-frame-size-exceeding' in RemoteSettings
2018-12-03 14:59:09 +00:00
Philippus Baalman
90bf989630 Replace scalactic deprecations (#25886) 2018-11-09 09:07:21 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Patrik Nordwall
b75bb8fc46 Deprecation and documentation for the AESCounterBuiltinRNG issue
* reproducer test of AESCounterBuiltinRNG issue
* update documentation of random-number-generator
* deprecate AES128CounterSecureRNG AES256CounterSecureRNG
* incorporate feedback from Johannes
2018-08-29 18:25:37 +02:00
Rafał Sumisławski
56498e7e58 Fix vulnerability in AESCounterBuiltinRNG
* The problem is that that internal counter isn’t incremented before cipher.doFinal() is used
* AES/CTR has a counter internally and cipher.update() should be used
* Another issue is that AES128CounterSecureRNG is initially seeded with a 16 bytes seed/key, but once it
  hits ReseedingThreshold it reseeds itself with a 32 bytes seed, effectively becoming AES256. This will
  crash if strong encryption is disabled.
2018-08-29 18:24:43 +02:00
Johan Andrén
3b594e14de
Merge pull request #25521 from akka/wip-artery-queue-sizes-patriknw
increase outbound-control-queue-size
2018-08-28 13:31:30 +02:00
Patrik Nordwall
d5b2aea176
Merge pull request #25035 from piotrromanski/wip-fix-math-abs-usage
Handle a negative value returned by Math.abs()
2018-08-27 16:29:32 +02:00
Patrik Nordwall
951f5a58fc increase outbound-control-queue-size
* since it's a linked queue nowadays it's fine to have a higher limit
* using 20000, since that is also the default of the system messages buffer
2018-08-24 15:48:02 +02:00
Patrik Nordwall
b9aecb7f5a
Merge pull request #25416 from chbatey/nits
Remove various compiler warnings
2018-08-23 11:36:57 +02: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
Christopher Batey
7299d6b26c
Harden BindCanonicalAddressSpec (#25404)
The randomly selected port by Artery could be the same as the randomly
selected port the test generates.

Fixes #25403
2018-08-20 13:56:11 +01:00
Patrik Nordwall
1cdc3c8970 explicit return type in ThrottlerTransportAdapter Java API (#25474) 2018-08-16 12:18:34 +02:00
Vladimir Leletko
973e8bfa23 https://github.com/akka/akka/issues/25429: add direction & throttler instances accessors to ThrottlerTransportAdapter module. add java compile only tests. (#25465) 2018-08-13 12:35:59 +09:00
Christopher Batey
a0e79a0542 Log exception for association failure (#25438)
There have been cases where the thrown
NettyTransportExceptionNoStackTrace contains no cause
and a message that doesn't indicate what type of exception has been
thrown when establishing a connection.
2018-08-06 18:17:58 +09:00
Christopher Batey
c53809c3b8 Remove various compiler warnings 2018-07-31 17:18:40 +01:00
Johan Andrén
85ffc17973 Stack trace changes depending on how throwable is constructed in JDK9+ (#25408)
This changes the test to not compare stacktraces with equals to avoid
test failures.
2018-07-31 00:08:10 +09:00
kenji yoshida
5b3b191bac Remove procedure syntax (#25362) 2018-07-25 13:38:27 +02:00
Philippus Baalman
3cf87a1c12 Remove duplicate 'for' in code comments (#25366) 2018-07-19 00:08:51 +09:00
Patrik Nordwall
231672fc1c
Merge pull request #25308 from DataDome/akka_remote_shutdown_warning
Changed log-level of ShutDownAssociation from Error to Warning
2018-07-11 13:30:39 +02:00
Christopher Batey
836347fe08 Typed persistence: Throw on persist failures, #24479
* Rather than stop so that users can add their own supervision e.g.
restartWithBackOff
* Only allow back off supervisoir for persistent behaviors
* Handle persist rejections
2018-07-09 10:57:36 +02:00
Kirill A. Korinsky
27601f5107
Changed log-level of ShutDownAssociation from Error to Warning
When the node has left the cluster, existed nodes throw
akka.remote.transport.Transport$InvalidAssociationException with message `The
remote system terminated the association because it is shutting down`.

This error normally happened when node is leaving the cluster in redeployment
proposal and it isn't an error but it creates a noise in monitoring/alert system.

So, I propose to log it as Warning.
2018-07-06 00:45:14 +02:00
Roman Filonenko
4d31d7ce49 log address having heartbeat problems in PhiAccrualFailureDetector (#24701) (#25237)
* log address having heartbeat problems in PhiAccrualFailureDetector (#24701)

* update binary compatibility comments
2018-06-27 07:19:36 +02:00