- this entails making Module.isSealed==true if attributes are set
- also removed Module.nest(), which implied fixing replaceShape to form
a CompositeModule where CopiedModule was used before (GraphModule and
TlsModule)
main work by @drewhk with contributions from @2m and @rkuhn
This work uncovered many well-hidden bugs in existing Stages, in
particular StatefulStage. These were hidden by the behavior of
OneBoundedInterpreter that normally behaves more orderly than it
guarantees in general, especially with respect to the timeliness of
delivery of upstream termination signals; the bugs were then that
internal state was not flushed when onComplete arrived “too early”.
* also make factories more consistent by only offering
FlowGraph.create()
* also remove secondary (edge-based) FlowGraph.Builder DSL
* also improve naming for conversions from Graph to
Source/Flow/BidiFlow/Sink
- ActorProcessor terminated eagerly when ConcatAll had just taken up a
new input stream but not yet received onSubscribe for it
- The ActorProcessor eagerly shuts itself down upon onError and that
cannot be changed without completely reworking the Pump, so I opted
for just tracking the outstanding substreamSubscribers that have not
yet seen OnSubscribe and making them cancel properly when that arrives
(possibly later).
The problem was reproduced with the TCK PrefixAndTailTest
required_spec313_cancelMustMakeThePublisherEventuallyDropAllReferencesToTheSubscriber
The tck subscriber was still referenced. Profiling revealed that the
root cause was the VirtualPublisher that holds a reference to the
realPublisher, which was MultiStreamOutputProcessor$SubstreamOutput,
which had the reference to the subscriber. The VirtualPublisher
is created by the Sink.publisher in the test, and the test holds
on to that VirtualPublisher reference.
The solution is to null out realPublisher field in the VirtualPublisher.
The old workaround with the NullSubscriber was removed.
Also made Sink.publisher reject additional subscribers.
* Remove name parameter (no overloads), naming is performed using `.withAttributes` or the new
convenience `.named`. Those adds the OperationAttribute.Name and also change the name of the
shape Inlet and Outlet.
* Remove Source/Sink parameter list for 0 parameter methods,
this allows usage of `Sink.head` instead of `Sink.head()`
Changed rules:
* 1.9 Always onSubscribe prior to any other signals
* 1.9 NullPointerException if subscriber is null
* 3.17 Long overflow, effectively unbounded instead of onError
Fixed some more things:
* fixed some FIXME
* Long drop and take
* memory leaks in tck tests, use BeforeClass to create ActorSystem
use AfterClass to shutdown ActorSystem
* more tck tests
* don't emit OnComplete when substream is cancelled
* work around for memory leak in PrefixAndTail
- ordering is not preserved by shufflers in GraphOpsIntegrationSpec
- larger tolerance is needed in GraphBalanceSpec since balancing does
not keep track of previous imbalances
- also add Source.repeat(elem)
* FlowMaterializer is now the actor independent interface
* ActorFlowMaterializer is the actor based interface
* MaterializerSettings renamed to ActorFlowMaterializerSettings
* impl.ActorBasedFlowMaterializer renamed to impl.ActorFlowMaterializerImpl
* Optimizations included in ActorFlowMaterializerSettings
* Note that http is using FlowMaterializer in api, but I suspect that it
will currently only run with a ActorFlowMaterializer
* StreamTcp and Http extensions now return Flows and Sources that can be materialized later
* Flow can now be completed with another flow to be turned into a runnable flow