Commit graph

1869 commits

Author SHA1 Message Date
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
Roman Filonenko
427124a531 increase threshold to publish heartbeat interval warnings in PhiAccrualFailureDetector (#25253) (#25259) 2018-06-26 16:14:25 +02:00
Richard S. Imaoka
bf8f60f1ff no need to rename to operators in internal API 2018-06-17 13:17:59 +09:00
Richard S. Imaoka
60eee84345 Replace graph with operator in Scaladoc/Javadoc 2018-06-09 17:42:56 +09:00
Christopher Batey
1787283757 Log receiving of heartbeats when verbose heartbeat logging is on (#25183) 2018-06-04 16:22:06 +03:00
Patrik Nordwall
73284fd897 log discarded messages in read-only endpoint #25127 2018-05-29 12:47:09 +02:00
Patrik Nordwall
cf864a940f limit negative acknowledgement logging, #25143 2018-05-28 09:11:51 +02:00
Patrik Nordwall
3439377816
Merge pull request #24983 from akka/wip-24972-tcp-restart-patriknw
Quarantine and cleanup idle associations, #24972
2018-05-22 13:11:36 +02:00
Patrik Nordwall
7fc7744049 Quarantine and cleanup idle associations, #24972
* fix NPE in shutdownTransport
  * perhaps because shutdown before started
  * system.dispatcher is used in other places of the shutdown
* improve logging of compression advertisment progress
* adjust RestartFlow.withBackoff parameters
* quarantine after ActorSystemTerminating signal
  (will cleanup compressions)
* Quarantine idle associations
  * liveness checks by sending extra HandshakeReq and update the
    lastUsed when reply received
  * concervative default value to survive network partition, in
    case no other messages are sent
* Adjust logging and QuarantinedEvent for harmless quarantine
  * Harmless if it was via the shutdown signal or cluster leaving
2018-05-22 13:10:30 +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
Johan Andrén
b27bdba13b
Do not tear down connections on IllegalArgumentException from serializer #24910 2018-05-16 15:35:05 +02:00
Patrik Nordwall
969cdb873a
Merge pull request #25020 from chbatey/upgrade-aeron
Upgrade Aeron and make use of channelStatus on subscription
2018-05-07 16:56:03 +02:00
Christopher Batey
c0f18c96d3 Disable TlsTcpWithActorSystemSetupSpec when not running tcp-tls tests 2018-05-01 09:49:51 +01:00
Christopher Batey
0d9aa17fef Upgrade Aeron and make use of channelStatus on subscription 2018-04-30 14:39:06 +01:00
Patrik Nordwall
27e9587a3b Configurable SSLEngineProvider in classic remoting, #23732 2018-04-30 10:24:34 +02: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
Kirill Yankov
3ebb9fa9c1 Fix serialization in TypedActor (#24851)
* fixed serialization in TypedActor
* generalized duplicates via Serialization.manifestFor
2018-04-12 18:58:13 +02:00
Patrik Nordwall
43dc381d59
Clear system messages sequence number for restarted node, #24847
* Notice that the incarnation has changed in SystemMessageDelivery
  and then reset the sequence number
* Take the incarnation number into account in the ClearSystemMessageDelivery
  message
* Trigger quarantine earlier in ClusterRemoteWatcher if node with
  same host:port joined
* Change quarantine-removed-node-after to 5s, shouldn't be necessary
  to delay it 30s
* test reproducer
2018-04-10 11:39:55 +02:00
Patrik Nordwall
332aa58540 clarify the resolve debug logging (#24858) 2018-04-09 10:39:13 +02:00
Christopher Batey
74f39e9409 ArteryMessageLoggingSpec pick up command line overrides for akka settings
Use ConfigFactory.load to pick up overrides in the additional actor
system. Otherwise one runs with udp and other tcp for the artery-tcp
job.

Fixes #24806
2018-04-03 08:03:57 +01:00
Christopher Batey
c8f16845f2 Log sent/receive message log level check #24774 2018-03-27 12:20:19 +02:00
Mark James Talbot
0a426a7ab0 Change Artery TCP to use bind address (#24773) 2018-03-26 13:44:33 +02:00
Stefan Wachter
3db145643a materialized value of Flow.lazyInit must be a Future #24670 (#24685)
* change materialized value of LazyFlow from [M] to Future[Option[M]]

* remove whitespace

* improve docu

* restore old Flow.lazyInit method and add new Flow.lazyInitAsync method

* fix deprecation messages

* add 2.5.11.backwards.excludes because of changed LazyFlow constructor signature

* check switching behaviour

* apply formatting

* improve deprecation message; improve null safety

* prevent premature stage completion by setting keepGoing

* deprecate Sink.lazyInit; add Sink.lazyInitAsync

* apply formatting

* add ProblemFilter.exclude for changed LazySink.this

* Update Sink.scala

* Update Sink.scala

* Update Flow.scala

* Update Flow.scala
2018-03-19 22:42:37 +09:00
Patrik Nordwall
8847f7dfb7 less aggressive resend of Artery sys msg after nack, #24744 (#24745) 2018-03-19 00:59:44 -07:00
Jimin Hsieh
2c2b8ba001 Remove some of Unused import warning (#24650) 2018-03-16 12:08:29 +01:00
Johan Andrén
82f60226ff
Make use of the fact that identity is eliminated (#24702) 2018-03-14 09:21:47 +01:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Patrik Nordwall
7d67524bb5 lazy init of SerializationExtension in Artery, #24620 (#24667)
to avoid loading serializers before ActorRefProvider has been initialized
2018-03-09 16:59:33 +09:00
Roman Filonenko
0ecadf7235 deduplicate logic for IODispatcher #24604 (#24619)
* deduplicate logic for IODispatcher #24604
 * introduce a resolveDispatcher helper in ActorAttributes
 * mention akka.stream.materializer.blocking-io-dispatcher instead of akka.stream.blocking-io-dispatcher in scaladocs
 * fix a flaky test
 * cosmetic changes in the touched files

* move resolveDispather helper to the Dispatcher companion object under a new name resolve

* filter out mima warning

* fix mima excludes after the 2.5.11 release

* address review comments
 * update stream-io.md with the correct dispatcher config key
 * mark ActorAttributes.Dispatcher#resolve as internal API
 * use the dispatche config key in ActorMaterializer

* add private[akka] to the resolve methods
2018-03-07 15:12:34 +01:00
kerr
97ca714d17 = all remove semicolons "bye-bye semicolon" (#24659) 2018-03-06 09:53:28 +09:00
Francisco José Bermejo Herrera
6646eded2c Add serializer for akka.NotUsed (#24599) (#24600) 2018-03-05 17:38:17 +01:00
Patrik Nordwall
cf312703fa small adjustment of the aeron vs tcp documentation 2018-02-23 10:41:21 +01:00
Patrik Nordwall
c15c22622e use Flow.lazyInit in Artery TCP (#24590) 2018-02-22 19:18:44 +09:00
Patrik Nordwall
a89268ee45 ambiguous method byteBuffer.limit with jdk9 (#24593)
```
[error] /localhome/jenkinsakka/workspace/akka-nightly-jdk9/akka-remote/src/main/scala/akka/remote/artery/tcp/ArteryTcpTransport.scala:160:35: ambiguous reference to overloaded definition,
[error] both method limit in class ByteBuffer of type (x$1: Int)java.nio.ByteBuffer
[error] and  method limit in class Buffer of type ()Int
[error] match expected type ?
[error]         val size = env.byteBuffer.limit
```
2018-02-22 16:52:34 +09:00
Patrik Nordwall
11b6065d97
Merge pull request #24586 from akka/wip-TlsTcpSpec-patriknw
fix TlsTcpWithHostnameVerificationSpec when run without tls
2018-02-21 20:44:04 +01:00
Patrik Nordwall
d03f177468 fix TlsTcpWithHostnameVerificationSpec when run without tls 2018-02-21 12:36:26 +01: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
Johannes Rudolph
bbdf3261c4 Describe options for hostname verification and certificates, #24390 2018-02-20 16:06:17 +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
162a1f80a0 Add Artery TCP transport, #24390
* transport config
* TCP specific classes in akka.remote.artery.tcp package
* TcpFraming stage that handle the additional streamId field and length based framing.
  Credit to jrudolph for this clean solution, which made it possible to use same
  envolope header for Aeron and TCP.
* magic first bytes to detect invalid access
* drain SendQueue to deadLetters in postStop
* error handling, restart, inbound and outbound streams
* udp vs tcp in autoSelectPort
* TCP specific flight recorder events
* update reference documentation
2018-02-20 16:06:05 +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
23fa8b0810 change spelling of behaviour to behavior, #24457 2018-02-01 15:10:46 +01:00
Johannes Rudolph
176bec52ae
=act don't initialize Serializer extension in RemoteActorRefProvider
Instead, load it as a library-extension.
2018-01-25 11:21:07 +01:00
Konrad `ktoso` Malawski
7c75abbf7e +str #24229 move SinkRef / SourceRef to akka.stream
+str #24229 remove protobuf changes, which do not need to be made in this PR

docs

moved things

config object

subscription timeout confifmed working, also, attributes

document attributes for sub timeout

tests for the source also failing when it should

additional demand test

implemented protection from materializing "in cycles"; would be nice in
types but that breaks the niceness of use of the types
SinkRef/SourceRef...

cleanup

no idle timeout built in, can use the Timeout stages

more docs

simplest change to prevent exposing SinkRef => SourceRef => SinkRef cycle

Things to decide:
 * is it ok to require using `getSource` / `getSink` as Java API, is there better naming?
 * where should the constructors go? I'd say just in regular javadsl/scaladsl `Source`/ `Sink` objects

move constructors to {javadsl,scaladsl}.{Source,Sink} companion objects

Remove now useless "canMaterialize" field

Separate stage (implementation) from ref (wrapped actor ref) to make it clearer what is serialized

Clarify that partner refs are not optional in on-the-wire interfaces

minor cleanup in SourceRefStage

Renamed the stages but questionable if that really helps ;)

cleanups, better docs

cleanup, fix docs compilation

fix mima

got rid of Futures in the materialized values of stream refs
2018-01-23 02:27:10 +09:00
Konrad `ktoso` Malawski
682b047ac3 +str #24229 first working SinkRef, though serialization is wrong somehow (when serialize-messages = on)
silly serialization mistake, should have fixed serialize as well

tage actors now can have names, which helps a lot in debugging

thread weirdness

make sure to fail properly, actually go over remoting

issue with not receiving the SinkRef... what

initial working SinkRef over remoting

remote Sink failure must fail origin Source as well

cleaning up and adding failyre handling

SinkRef now with low-watermark RequestStrategy

source ref works, yet completely duplicated code
2018-01-23 02:27:10 +09:00
Patrik Nordwall
f890bc6abf
Merge pull request #24070 from akka/wip-SendQueueSpec-patriknw
additional test of SendQueue
2018-01-16 19:10:43 +01:00