Commit graph

1170 commits

Author SHA1 Message Date
Arnout Engelen
8a354ec3f0
stream: Improve half-closing of outgoing TCP connections (#28624)
Notably fixes the case where upstream finished before the connection
was successfully established, and avoids RSTing the incoming stream
when the outgoing stream is done (which is now possible due to the
cancellation reason being propagated).
2020-02-20 13:28:21 +01:00
Enno
cff15cf40d
Docs: Source.repeat (and friends) (#28615) 2020-02-19 09:03:59 +01:00
Razvan Vacaru
bb895619b9
Docs: sink seq operator examples (#28616) 2020-02-17 10:26:53 +01:00
Johan Andrén
0cd63b7996
Push that TlsSpec timeout a bit up (#28591)
Trying to fix failures #28449 and #25858
2020-02-12 22:12:37 +01:00
Evgeny Sidorov
dcdaa5a0dd
Example for Source.fromIterator #25468 (#28582)
* add example for Source.fromIterator #25468

* scala fmt code style fix

* don't use test as a sample for docs
2020-02-11 14:58:00 +01:00
eyal farago
ccd8481fec
stream: add flatMapPrefix operator (#28380) 2020-02-05 15:37:27 +01:00
Johannes Rudolph
a01dfa6201
stream: remove extra printStackTrace 2020-02-04 11:16:34 +01:00
Johannes Rudolph
1fbd1d338f
stream: fail eagerly during SubSink/SubSource materialization (#28492)
This way the stack trace will be more helpful because it contains the stage
that actually triggered the materialization.

Otherwise, we will only fail during `preStart` in the interpreter where the
stage will be failed and the error be propagated through the stream where
it can be hard to figure out what happened.

Also improve the message itself to contain the user provided name of the
sink/source.
2020-02-04 11:04:31 +01:00
Yakiv Yereskovskyi
a614f0bee7 allow Sink.queue concurrent pulling (#27352)
* allow Sink.queue concurrent pulling

* replace methods with default parameters on two overloaded methods to pass binary compatibility check :/

* replace ⇒ with =>

* reformat

* add javadsl

* fix PR comments and add concurrency to Sink.queue

* fix merge after auto resolving

* duplicate changes to javadsl

* revert source changes

* add graceful terminations

* clean up tests

* optimize imports

* trigger rebuild

* cover the case when materializer shutdown before async callbacks were processed

* vars to vals; fix require messages

* disable compatibility check for @InternalApi private[akka] class
2020-01-24 21:33:39 +01:00
Johannes Rudolph
c39dd6506e
stream: filter out elements without demand
This will also mean that completion will not be blocked by elements that
will later be filtered out.

One particular use case of that would be a kind of partitioning use case,
where you put several streams behind a broadcast and each consumer will filter
out elements not handled there. In that case, the broadcast can get head-of-line
blocked when one of the consumers currently has no demand but also wouldn't
have to handle any elements because they would all be filtered out.
2020-01-22 10:26:46 +01:00
Johan Andrén
fc0c98e17a
Support cancellation propagation in StreamRefs #28317 2020-01-20 10:28:26 +01:00
Mikhail Limansky
feb9499431 Update after merge 2020-01-17 16:56:15 +03:00
Mikhail Limansky
52c01832da Merge remote-tracking branch 'akka/master' into scalatest310 2020-01-17 16:03:32 +03:00
Johan Andrén
044e706eb9
Incorrect assumptions in LazyAndFutureSourcesTest (#28479) 2020-01-14 13:53:05 +01:00
Mike Limansky
d9ed927df0 Update to ScalaTest 3.1.0, fix #28289. 2020-01-11 15:15:10 +03:00
Safta Catalin Mihai
6278968af5 Fix RetryFlow not stopping after maxRetries (#28443)
- the check for retryNo was pattern matching on tuple instead of any value
2020-01-03 21:07:19 +01:00
Helena Edelson
6bf20f4117 Update all copyright headers to 2020 after new year's #27881 (#28434) 2020-01-02 13:24:59 +01:00
Brian Wignall
fd41299943 Fix typos, via a Levenshtein-style corrector 2019-12-19 01:57:55 -05:00
Arnout Engelen
21fbfe6724
Add checkTestsHaveRun task to check tests have run (#28350)
Extend JUnitSuite to make sure the test is included in the report.

After merging this, nothing would happen. We should then invoke
`checkTestsHaveRun` from the jenkins nightly builds. That should then
fail the build until we merge #28347 and switch the nightly builds
to run on JDK11.
2019-12-13 11:29:20 +01:00
Patrik Nordwall
0008f1f400 Partition must not pull from closed in, #27189 2019-12-10 17:33:11 +01:00
Andrey Yamshchikov
87b94b65fd Add Java DSL Flow#mapError version without PartialFunction (#24992) (#26310)
* Add an overloaded version of the Flow#mapError (Java DSL) which does not use a Scala PartialFunction.
* Add test verifying mapError matching on parent class
* Add to Source, SubSource and SubFlow as well
2019-12-10 13:05:56 +01:00
Johan Andrén
653d05e7d6 Source.unfold examples (#28081) 2019-12-09 15:32:50 +01:00
Arnout Engelen
25ad10f893
Document asSubscriber stage (#28128)
* Unfortunately it seems the jdk9-only tests could not actually be compiled.
With these changes those can actually be compiled and ran again.

* Always link to jdk11 for java.* javadocs

* Update sbt-paradox-akka to fix linking to inner classes for javadoc
2019-12-05 16:40:05 +01:00
Jean-Baptiste Giraudeau
6d893fb571 Flow.delayWith allows custom delay for each element. (#25000) 2019-11-27 17:30:56 +01:00
Lim Chee Hau
571c7bd545 Include host and port in BindException message (#27785) (#27984) 2019-11-26 19:48:19 +01:00
Johan Andrén
d385c1098a
Operator docs for Source.combine (#28195) 2019-11-22 14:42:36 +01:00
Enno
70766dfa18 Docs: Remove extra type params in RetryFlow signature (#28097)
* Docs: Remove extra type params in RetryFlow signature

* Add link to API docs
2019-11-20 11:48:30 +01:00
Johan Andrén
a56a53734f Avoid deadlock on concurrent extension with materializer init (#28046)
* Avoid deadlock on concurrent extension with materializer init #28037

* Wrap blocking extension await with blocking context
2019-10-25 17:05:59 +01:00
Johan Andrén
74adecb4e7
Align lazy and future operators #26446 2019-10-16 17:02:12 +02:00
Christopher Batey
4a72985e48 Expose new DNS protocol via the DNS extension (#28009)
* TCP/UDP to use new protocol
* Change other parts of Akka to use new protocol
* Mention in migration guide
2019-10-16 10:22:01 +02:00
Enno
70c3cdfa97
RetryFlow: retries of individual stream elements with backouff (#27742)
RetryFlow wraps a flow with context and allows to individually retry elements. A decider function decides if another try should be made and gives the element to try with.
Retries are backed off exponentially.
Retries are limited by maxRetries.

Inspired by the work of Gilad Hoch <gilad.hoch@thomsonreuters.com> and Martynas Mickevičius <self@2m.lt>
2019-10-15 18:41:30 +02:00
Johannes Rudolph
7e6f351138
stream: add CancellationStrategy attribute to configure default stage cancellation behaviors 2019-10-15 14:24:47 +02:00
Patrik Nordwall
6f48dece1b
Merge pull request #27947 from johanandren/wip-27944-runWith-javadsl-coverage
API compile coverage for Java DSL runWith
2019-10-11 15:44:57 +02:00
Patrik Nordwall
ca7cad3a6d fix TlsSpec on JDK 11, #27956 (#27961)
* one less cause wrapping in JDK 11
2019-10-11 10:11:06 +02:00
Patrik Nordwall
bb6d6365b1
Scaladoc improvements (#27929)
* private[akka] visibility on some internal classes
  * found via unidoc
* fix Scaladoc links
2019-10-10 14:17:01 +02:00
Patrik Nordwall
25ff48cca1
Merge pull request #27848 from johanandren/wip-24580-GraphMergePrioritizedSpec-fail-fix
More tolerance in GraphMergePrioritizedSpec
2019-10-09 17:31:03 +02:00
Johan Andrén
d7aa6d5d03 API compile coverage for Java DSL runWith #27944 2019-10-09 15:25:12 +02:00
Eric Cartner
ca8995be68 Ignore length field value when provided computeFrameSize (#27884) (#27938)
* Add test for computed frame sizes from negative length field values
* Skip check for length field value < 0 when using computeFrameSize
2019-10-09 13:40:34 +02:00
Patrik Nordwall
e8a1556060
Streams TLS and Tcp with SSLEngine, #21753 (#27766)
* SSLEngine factory instead of SSLContext and AkkaSSLConfig parameters
  in TLS and Tcp
* Update TlsSpec to use SSLEngine
* Keep copy of old TlsSpec for test coverage of deprecated methods
* Update doc example of how to setup a SSLEngine
* full API and deprecations
* don't use default param values
* java doc example
* migration guide
* mima
* update to sslconfig 0.4.0
  * hostname verification changed in sslconfig, so use jvm verifier
* change to mima file
* update doc sample, init SSLContext once
* remove FIXME for halfClosed
2019-10-08 12:30:41 +02:00
Raymond Roestenburg
e5772b1107 Added mapError to SourceWithContext and FlowWithContext. (#27900)
* Added mapError to SourceWithContext and FlowWithContext.

* Formatting.

* Doc fix.

* Formatted tests.
2019-10-07 15:29:26 +00:00
Johan Andrén
803691499c More tolerance in GraphMergePrioritizedSpec #24580
Also a speedup
2019-10-01 15:38:54 +02:00
Patrik Nordwall
a7c43cf573
Config to exclude class prefix from serialize-messages, #24273 (#27517)
* Config to exclude class prefix from serialize-messages, #24273

* Adding no-serialization-verification-needed-class-prefix, with "akka." included
  by default
* This is important now when we disable Java serialization by default.
  There will be many complaints about Akka internal classes that are not marked with
  NoSerializationVerificationNeeded, and we can't really sprinkle that everywhere.
* Not removing NoSerializationVerificationNeeded usage in Akka classes because that
  may break bin compat, even though it's needed any more.

* fix DisabledJavaSerializerWarningSpec
2019-09-26 22:51:12 +02:00
Johan Andrén
4f9a4b5403 System materializer guardian (#27723)
* Eager creation of system materializer on system startup #26850

* System level materializers always spawned under a specific system actor #26850

* No need for RepointableActorRef logic anymore

* MiMa filter

* Make the creation timeout higher
2019-09-26 22:49:33 +02:00
Patrik Nordwall
db132cd216 Final removal of ActorPublisher and ActorSubscriber, #26187
* some messages from ActorSubscriber were also used in other places,
  so moved those to impl.ActorSubscriberMessage
* WatermarkRequestStrategy used by SourceRefImp, so moved there
2019-09-19 13:21:52 +02:00
Johan Andrén
47a0cca919
Fixes to one of the tests in FlowGroupBySpec (#27675) 2019-09-16 11:59:00 +02:00
Roman Filonenko
489f7c2288 fix JsonFraming to accept multiple top-level arrays (#26098) (#26099) 2019-09-12 17:42:22 -07:00
Nicolas Vollmar
751918e84c Deprecates status message based api #27503 (#27519)
* Deprecates status message based api #27503
* Deprecates actorRefWithAck for actorRefWithBackpressure
2019-09-10 11:59:19 +02:00
Patrik Nordwall
b5f6f4aa00
Merge pull request #27644 from akka/wip-27642-Materializer.create-patriknw
rename the new Materializer.create to createMaterializer, #27642
2019-09-06 10:15:00 +02:00
Patrik Nordwall
e80b591115 rename the new Materializer.create to createMaterializer, #27642
* because static methods are resolved by looking at extended class too,
  and that results in ambigious method clash with existing create in
  ActorMaterializer
2019-09-06 09:02:22 +02:00
Johan Andrén
ed955e0da4 Propagate downstream cancellation failures (#27547)
* Add doc clarification about IOResult on sources
* Better error message for IOOperationIncompleteException

Co-Authored-By: Johannes Rudolph <johannes.rudolph@gmail.com>
2019-09-05 20:55:48 +02:00