- 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”.
* Gives Inlets and Outlets a `carbonCopy` method and switches to allocate them via `apply`
* Removes 4 Array allocations per FanIn and uses a bitmasked array instead
* Makes the FlattenStrategy.concat instance a singleton
- create a fully RS compliant minimal identity processor (that is not an
Actor)
- replace SubscriberSourceVirtualProcessor,
PublisherSinkVirtualSubscriber and PublisherSinkVirtualPublisher with
this
- add tests that transform Sink.publisher’s and Source.subscriber’s
materialized value
- also remove the Keep.{left, right} optimization in order to make
side-effecting mat value transforms execute even if their values are
discarded
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.