Commit graph

1774 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
eyal farago
ccd8481fec
stream: add flatMapPrefix operator (#28380) 2020-02-05 15:37:27 +01:00
Patrik Nordwall
f6bea845ca
update MiMa latestPatch (#28534)
* update MiMa latestPatch

* Even later latest

* exclude jdk9 classes in 2.6.x excludes

* mima exclude for SystemMaterializer.materializer type

Co-authored-by: Johan Andrén <johan@markatta.com>
2020-02-04 15:43:13 +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
Arnout Engelen
6dbbfd53f0 Explicit SystemMaterializer.materializer return value 2020-01-30 12:19:52 +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
__
e182c5a1fc Add stream name to buffer overflow log message (#28159)
* Add stream name to buffer overflow log message (#28085)

* De-emphasize stream name by moving it to the back

Co-authored-by: Arnout Engelen <github@bzzt.net>
2020-01-06 16:18:43 +01: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
tison
03ce8a9349 [doc] Fix scala doc in javadsl.FileIO (#28328) 2019-12-26 11:42:04 +01:00
Brian Wignall
fd41299943 Fix typos, via a Levenshtein-style corrector 2019-12-19 01:57:55 -05:00
Arnout Engelen
a3ca3a3fca Perform MiMa checks against 2.6.1 (#28324)
* Exclude jdk9+-specific classes from mima

as in https://github.com/akka/akka/pull/24297#issue-162564159
2019-12-13 17:05:16 +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
Brian Wignall
10e61e816f Fix typos (#28326) 2019-12-09 08:41:55 +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
Johannes Rudolph
702b6a7f41 actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem

* add overrides with concrete type for Java API everywhere
2019-12-05 16:01:22 +01:00
Johannes Rudolph
d0027850e6
build: fix mima checking for Akka 2.6.0 (#28300)
Previously, due to a syntax problem, only typed artifacts were checked against
2.6.0.

Co-Authored-By: Arnout Engelen <github@bzzt.net>
2019-12-04 15:40:38 +01:00
Johan Andrén
583fe3e2a4
Delay operator emit early fix #28269
* Bugfix for delay stage with EmitEarly #28269

Emit early would make it pull eagerly even if out was not available,
when element arrived and buffer was full and out not available that
element would be left in the input port and never end up in the buffer.

* Additional cleanup of the Delay stage
2019-11-29 14:46:51 +01:00
sullis
dbc97fb6f3 Scala 2.13.0 -> Scala 2.13.1 (#28140)
* Scala 2.13.0 -> Scala 2.13.1

* Update to genjavadoc 0.15

* Allow 'higherKinds' without explicit import

To follow the 2.13.1 convention

* Remaining higherKinds imports

* Mima excludes for missing value classes in generics
2019-11-29 13:38:19 +01:00
Jean-Baptiste Giraudeau
6d893fb571 Flow.delayWith allows custom delay for each element. (#25000) 2019-11-27 17:30:56 +01:00
Christopher Batey
09a97ce1c9 Document scanAsync (#28239)
* Document scanAsync

* Include async function in scanAsync example
2019-11-26 12:25:20 +01:00
Johannes Rudolph
0384baa53e Small interpreter metadata fixes (#28218)
* stream: debug dot output should point `shouldPush` in the right direction

* stream: also support Pushing and Pulling states for ConnectionSnapshot

Using ShouldPull for Pushing and ShouldPush for Pulling is not quite accurate
but probably good enough for now.
2019-11-25 10:48:25 +01:00
Johan Andrén
d385c1098a
Operator docs for Source.combine (#28195) 2019-11-22 14:42:36 +01:00
Johan Andrén
61bd3d42b6
Document and fix getAsyncCallback thread safety issues #27999 2019-11-22 13:38:06 +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
a341343f2c latestPatchOf 2.5.26 (#28031)
* latestPatchOf 2.5.26

* Bincomp fixes
2019-10-18 16:30:55 +02:00
Johan Andrén
8d8c7dbada Add names for input and output boundaries 2019-10-17 09:30:40 +02:00
Johan Andrén
74adecb4e7
Align lazy and future operators #26446 2019-10-16 17:02:12 +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
Johannes Rudolph
28d4fb4b00
stream: refactoring: only one implementation for completeStage / cancelStage / failStage 2019-10-15 13:15:21 +02:00
Patrik Nordwall
5de5dec6ee
Merge pull request #27988 from akka/wip-protobuf-3.10.0-patriknw
Update protobuf-java and protoc to 3.10.0
2019-10-15 11:09:30 +02:00
Patrik Nordwall
4e8a5d333b
More structured logger names, #27922 (#27934)
* some cluster logging improvements
* most logger names are actually good, when using ActorLogging since
  config can be setup on the package (prefix)
* override logSource when StageLogging is used
* replace system.log with more specific logger
2019-10-14 17:55:12 +02:00
Scala Steward
63df007685 protoc version 3.10.0 2019-10-14 11:11:21 +02:00
tison
853b5b62a1 Remove ActorSubscriber #26187 2019-10-14 10:41:24 +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
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
Patrik Nordwall
1a8a438144
doc: Source.maybe, #25468 (#27832) 2019-10-03 14:09:45 +02:00
Johannes Rudolph
650068aa45
Convert 2.5.x MiMa excludes to subdirectory style
Using this script:

```sh

set -ex

FILE=$1
DIR=`dirname $FILE`
TMP_FILE=$DIR/_existing.excludes
FINAL_FILE=$DIR/2.5.x.backwards.excludes/_existing.excludes

mv $FILE $TMP_FILE
mkdir $DIR/2.5.x.backwards.excludes
(echo "# This file contains all excludes added before changing to the subdirectory style" && cat $TMP_FILE) > $FINAL_FILE
rm $TMP_FILE
git add $FINAL_FILE
```
2019-10-01 13:59:56 +02:00
Scala Steward
6b17a7a15f Update scalafmt-core to 2.1.0 (#27831)
* Update scalafmt-core to 2.1.0

* scalafmt
2019-10-01 12:24:51 +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
Johan Andrén
37a76aa9a0
BlockingIODispatcher actually not needed #27632 2019-09-26 15:52:18 +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
Patrik Nordwall
c0099b728e
Merge pull request #27733 from johanandren/wip-26392-StreamRefSpec-failure
Eliminate race in multi node StreamRefSpec
2019-09-19 11:25:12 +02:00
Johan Andrén
60a6e9bf5b Eliminate race in multi node StreamRefSpec #26392 2019-09-17 15:42:22 +02:00