The GitHub Actions job "Pull Requests" on 
pekko.git/fix-prefixAndTail-empty-tail has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
8c6360ccae1f3d3becb7d829936ec07c8f52444c / He-Pin <[email protected]>
fix: avoid substream subscription timeout for empty prefixAndTail tails

Motivation:
prefixAndTail emits (prefix, tailSource) and then waits for the tailSource to
be materialized before pulling upstream again. When a downstream consumer
intentionally discards the tail (typical for protocol-style splitWhen +
prefixAndTail + mapAsync flows where a known-empty substream is ignored), the
stage holds the substream open until the configured stream-subscription-timeout
fires (default 5 seconds), silently stalling the rest of the pipeline.

Modification:
Issue a single speculative pull from upstream as soon as openSubstream() has
emitted the tail Source. If upstream finishes before any further element
arrives, the stage now completes immediately instead of waiting for the
substream subscription timer. If upstream pushes an element before the tail
Source has been materialized, it is buffered in a one-element slot and
delivered on the first downstream pull of the tail, preserving normal
back-pressure semantics for late materialization.

Result:
Discarding a tail Source from prefixAndTail no longer blocks the parent flow
for the subscription timeout window when the tail happens to be empty.
Existing subscription-timeout behaviour for non-empty unsubscribed tails is
unchanged.

Tests:
- sbt "stream-tests/Test/testOnly 
org.apache.pekko.stream.scaladsl.FlowPrefixAndTailSpec" - 18/18 passed
- Verified directional test "complete promptly on empty tail without waiting 
for subscription timeout (akka #20008)" fails against the pre-fix implementation
- Full stream-tests/Test/test and +mimaReportBinaryIssues - Not run locally - 
deferred to CI

References:
Refs akka/akka#20008

Report URL: https://github.com/apache/pekko/actions/runs/26389128653

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to