Commit graph

1225 commits

Author SHA1 Message Date
Patrik Nordwall
ac71fc7ec0 Merge pull request #21998 from akka/wip-OutputStreamSourceStage-patriknw
fix compilation warnings in akka-stream
2016-12-14 13:16:52 +01:00
Konrad `ktoso` Malawski
6a94eb45a6 =str compilation fix, because merged without validation 2016-12-14 13:12:58 +01:00
Konrad Malawski
192a9e11b1 +str add more information to generic connection shutdown connection 2016-12-14 12:39:24 +01:00
Konrad Malawski
e7e1f74427 =str more specific error type if idle-timeout triggers in tcp 2016-12-14 12:39:24 +01:00
Alexander Golubev
4207682624 =str 20448 splitAfter should emit substreams in a lazy way (#21306) 2016-12-14 10:47:07 +01:00
Patrik Nordwall
a813afeb04 fix compilation warnings in akka-stream
* fix compilation warning in StreamLayout

StreamLayout.scala:742: The outer reference in this type test cannot be checked at run time.
[warn]     final case class Buffering(demand: Long) extends SubscriptionState

* fix compilation warning in OutputStreamSourceStage

logic.wakeUp
"method invocation uses reflection"

* fix compilation warning in TLSActor

TLSActor.scala:155: Reference to uninitialized variable lastHandshakeStatus
[warn]   lastHandshakeStatus = engine.getHandshakeStatus
2016-12-13 16:41:04 +01:00
Patrik Nordwall
b250d03cc9 Merge pull request #21896 from johanandren/wip-21864-asOutputStream-close-race-johanadren
asOutput stream close race
2016-12-13 13:45:54 +01:00
Patrik Nordwall
c05bd51b68 format the code 2016-12-09 14:08:13 +01:00
Konrad `ktoso` Malawski
2ea8cd7410 =str deprecate ActorPublisher/Subscriber, use GraphStage (#21952)
* =str deprecate ActorPublisher/Subscriber, use GraphStage

* =str deprecate Source.actorPublisher / Sink.actorSubscriber

* =str added deprecation note of ActorPublisher,Subscriber
2016-12-08 17:22:01 +01:00
Andrew Rapp
591eafe04c Fix handling of escape sequences in JsonObjectParser #21961 (#21962)
* Fix handling of escape sequences in JsonObjectParser #21961

* Add test coverage to verify issue #21961
2016-12-08 14:35:53 +01:00
ortigali
31e61d0fb3 InputStream from StreamConverters.asInputStream respects read() contract #21943 (#21954) 2016-12-07 17:33:36 +01:00
Patrik Nordwall
dce668771e fix shutdown of pending StressSpec, #21960 (#21963) 2016-12-07 15:38:11 +01:00
Patrik Nordwall
5bffbe1c18 Merge pull request #21918 from akka/wip-IODispatcher-patriknw
make IODispatcher attribute public
2016-12-05 15:18:14 +01:00
Konrad Malawski
04ab4ebb9c -str #21423 remove deprecated Stage references (#21919)
* -str #21423 remove deprecated Stage references

* include mima filters for removed classes
2016-12-02 14:23:13 +01:00
Konrad Malawski
726d3c4476 =str #21926 add note on (non)guarantees of materializer SPI (#21932) 2016-12-02 12:00:19 +01:00
Patrik Nordwall
c16e12ffeb make IODispatcher attribute public 2016-11-30 20:43:07 +01:00
Patrik Nordwall
e04444567f Speedup pull request validation
* speedup ActorCreationPerfSpec
* reduce iterations in ConsistencySpec
* tag SupervisorHierarchySpec as LongRunningTest
* various small speedups and tagging in actor-tests
* speedup expectNoMsg in stream-tests
* tag FramingSpec, and reduce iterations
* speedup QueueSourceSpec
* tag some stream-tests
* reduce iterations in persistence.PerformanceSpec
* reduce iterations in some cluster perf tests
* tag RemoteWatcherSpec
* tag InterpreterStressSpec
* remove LongRunning from ClusterConsistentHashingRouterSpec
* sys property to disable multi-jvm tests in test
* actually disable multi-node tests in validatePullRequest
* doc sbt flags in CONTRIBUTING
2016-11-30 14:31:06 +01:00
Johan "Party Cannon" Andrén
267f31149c Lazy source (#21081) 2016-11-25 16:25:26 +01:00
Kam Kasravi
a47bccbec3 Fixes #20553 Tree flattening should be separate from Fusing 2016-11-22 15:45:02 -08:00
Andrey Kuznetsov
3bd53c8bc2 fix SourceQueue docs inconsistencies #21852 2016-11-22 14:11:09 +01:00
kenji yoshida
aebfda540d =doc fix double 'the' in some docs (#21881) 2016-11-22 02:14:37 +01:00
Konrad Malawski
6508e1175f =str follow up review comments on compression PR 2016-11-21 14:46:15 +01:00
Johannes Rudolph
7fa7cc1624 =str add safeguard against accidental logic cycles in user ByteStringParser logic
Before, such a cyclic logic might have spun on one thread. Now recursion
is limited to a configurable number of recursions.

The default number of 1000 is an arbitrary number high enough not to be a
limitation in realistic cases. Recursion only happens when a ParsingStep consumes
data without emitting an element immediately moving on to the next step.

In the unlikely case that a parsing logic requires more recursion, the logic
can override `ParsingLogic.recursionLimit`.
2016-11-21 14:46:15 +01:00
Johannes Rudolph
a2402f7aff =str #21873 fix ByteStringParser getting stuck when parsing step doesn't produce output 2016-11-21 14:46:15 +01:00
Johannes Rudolph
a0222e9934 =str #21395 quiet down errors in ByteStringParser stage + better compression errors 2016-11-21 14:46:15 +01:00
Johannes Rudolph
6470463b50 =str #21395 fix default flushing in Deflate/Gzip compression
This was accidentally lost during the move from akka-http.

Otherwise, it isn't possible to decompress chunk-by-chunk because the
implementation will internally buffer data.
2016-11-21 14:46:15 +01:00
Johannes Rudolph
2c32a7cde9 !str #21395 move compression default values used in public API into public place
Would it otherwise have even worked for non-akka users?
2016-11-21 14:46:15 +01:00
Vsevolod (Seva) Belousov
10e17ae8b5 Fixed the bug in Attributes.getFirst(default : T) #21658 (#21846) 2016-11-21 13:09:30 +01:00
drewhk
3e49054862 Merge pull request #21853 from drewhk/wip-21838-proper-websocket-backpressure-drewhk
#21838: Fix ByteStringParser backpressure
2016-11-18 10:54:40 +01:00
Johan Andrén
e4f019738b Correct errors from InputStreamSinkStage when first read times out #21804 (#21821) 2016-11-18 10:53:32 +01:00
Christian Schmitt
4325f8bacd asOutputStream did never complete on close and exposed a unsafe callback #20503, #21864
StreamConverters.asOutputStream did never complete if the buffer size was greater than zero,
this lead to a bad state, where the close was unblocked, but the stage was never completed.
Also the OutputStream uses getAsyncCallback which had the problem that it always lead to races,
if flush or close was called to early.
2016-11-18 10:53:14 +01:00
drewhk
e0a062dd72 #21833: Fix race in BroadcastHub shutdown and new registrations 2016-11-18 10:23:43 +01:00
Hawstein
c373cef20f use SimpleLinearGraphStage to reduce the boilerplate code #21830 2016-11-18 10:13:15 +01:00
Olli Helenius
658b46e1cc Move (de)compression helpers to akka-stream module #21395 (#21409)
* Move (de)compression helpers to akka-stream #21395

* Move compression and decompression -related classes from
  akka-http-experimental to akka-stream
* Add Compression helper object with functions to create
  decompressing Flows
* Add a short cookbook entry

* =str move compression impl classes into their own directory (and change visibility)

* =str also expose gzip/deflate compression flows

* Fix formatting of plural ByteStrings in cookbook

* =str #21395 make compressor call Deflater.end in postStop to release resources

Also simplified the creation of the flow given a compressor.

* =str #21395 decompressors call Inflater.end in postStop to release resources

* =str #21395 smallish Scaladoc fixes
2016-11-17 22:42:37 +01:00
Johannes Rudolph
b4cfc3717f =str #21753 simplify TLSActor configuration by allowing to specify SSLEngine directly (#21822)
Do all (Akka)SSLConfig magic in one place directly in the TLS API.

Also, introduce new low-level entrypoint in TLS that allows to specify
an SSLEngine constructor directly without relying on SSLContext. This
allows users to use third-party SSLEngine implementations like netty's
OpenSslEngine together with akka-stream.
2016-11-17 16:07:24 +01:00
Endre Sándor Varga
f3ba271842 #21838: Fix ByteStringParser backpressure
and convert it to simple push-pull
2016-11-17 14:43:39 +01:00
Hawstein
96a1d2a081 rewrite Buffer as a GraphStage #21528 2016-11-15 18:48:33 +01:00
drewhk
91b522e186 #21743: FlattenMerge should propagate outer attributes
Added Materializer.materialize() version that takes explicit initial attributes
2016-11-09 20:14:04 +01:00
Andy Chung
fff707781e Took grab and pull out of try 2016-11-04 16:13:11 +00:00
Andy Chung
a6a4d1ac7f Fixed error handling behaviour of Fold and Reduce 2016-11-04 10:38:35 +00:00
Alexander Gavrilov
20942b3126 Fix #21760 - Close Tls connection if Inbound closed before receiving peer's close_notify (#21786)
When application closes inboud using engine.closeInbound the engine can generate an alert message and put it into writer.outboundList. As a result the engine can have a new data packet in outbound and its isOutboundDone will be false. We have to ensure that it will be flushed to the network, that's why we have to update lastHandshakeStatus via the actual status of the engine. Otherwise the actor will transition to the flushingOutbound state but will never flush outbound, since engineNeedsWrap precondition will be false.

Generally speaking whenever we signal something to the SSLEngine, weshould also read getHandshakeStatus afterwards to understand what we need to do next. This was done everywhere but for this engine.closeInbound.
2016-11-04 11:00:13 +01:00
Konrad Malawski
783d961142 reference.conf MUST end with newline (#21755) 2016-10-28 16:46:51 +02:00
Johannes Rudolph
c9854e4350 =pro merge ssl-config-akka from ssl-config project into akka-stream (#21551)
This will fix the cyclic dependency issue between the ssl-config repo
and akka.

It would have been better if akka-stream would not require
these changes at all but com.typesafe.sslconfig.akka.AkkaSSLConfig is
part of the public interface of akka-stream's TLS stage. So, this
can only be fixed in the next major version.

Source code was copied over from the tree at commit
470fae76f3

See https://github.com/typesafehub/ssl-config/issues/47
2016-10-28 16:41:26 +02:00
Konrad Malawski
0127d4f424 +str #18793 StageLogging that allows logger access in stages (#21696)
* +str #18793 StageLogging that allows logger access in stages
Also, non ActorMaterializers can opt-into providing a logger here.

* +str #18794 add javadsl for StageLogging

* fix missing test method on compile only class
2016-10-28 16:05:56 +02:00
Iulian Dragos
abf8b1155c Update package declaration to fit directory. 2016-10-27 18:03:34 +02:00
Ortigali
f970412af7 Rewrite Sink.ignore as a GraphStage #21527 2016-10-26 12:38:49 +02:00
Patrik Nordwall
aa8c253d14 improve streams actor integration docs, #21698 (#21700)
* mapAsync + ask should be the first choice
* add missing Source.queue
* prefer actorRefWithAck
* move ActorPublisher and ActorSubscriber to the end
  with additional warning
* fix wrong doc of SourceQueue offer
* and add missing java api
2016-10-26 10:24:51 +02:00
Konrad Malawski
bcf4de5b2c +str #20795 IOResult construction exposed, in bincompat way (#21070)
* +str #20795 IOResult construction exposed, in bincompat way

Thanks https://github.com/ktoso/kaze-class ;)

* Addressed feedback in IOResult

* Update IOResult.scala

* Update IOResult.scala
2016-10-24 17:00:51 +02:00
Falmarri
a28d2c579f Added a flag on takeWhile to allow it to include the final element, #21330 2016-10-18 12:02:59 +02:00
Mateus Dubiela Oliveira
c3abde60d5 Add scanAsync to Akka Streams, similar to scan but taking a Future (#21553)
* Add comprehensive tests
* Add documentation

* Damn comma after rebase

* Add documentation for foldAsync and scanAsync

* Rename aggreator and aggreating to current

* Remove out availability check

* Revert removing out and some refactors

* Formatting documentation

* Use after instead of Promise in test

* Use package reference to after and some refactoring
2016-10-17 16:43:11 +02:00