You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by GitBox <gi...@apache.org> on 2026/08/24 08:01:25 UTC
[GH] (pekko/fix/3459-demand-replenishment-regression): Workflow run "Scalafmt" is working again!
The GitHub Actions job "Scalafmt" on pekko.git/fix/3459-demand-replenishment-regression has succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run:
efa45579acf123410044f9a162ad05115dc23c78 / 虎鸣 <he...@alibaba-inc.com>
fix: process interpreter events between StageActor drain messages
Motivation:
LazyDispatch.drain() processes up to stage-actor-drain-batch (16)
messages in a tight loop within a single runAsyncInput call. Each
handler(item) may push an element (enqueuing a push event), but
interpreter.execute() is only called AFTER the entire drain completes.
This means messages 2..N see stale isAvailable(out)=false because the
pull from message 1's push has not propagated yet. External-source
stages using getStageActor (e.g. pekko-connectors UDP) silently drop
15/16 elements.
Modification:
Call interpreter.execute(2) after each handler(item) in the drain loop.
This processes the enqueued push event and propagates the pull via the
chase mechanism (push → onPush → pull → onPull → isAvailable=true),
replenishing demand before the next message is dispatched. The limit of
2 is sufficient: 1 event for the push + chase budget for the pull.
Result:
- Demand is replenished per-element for getStageActor-based stages
- Output batching (#3288) is fully preserved (3.59M ops/s, no regression)
- The coalescing optimization (N tells → 1 AsyncInput) is preserved
- UDP connector tests pass without modification
Tests:
- sbt "stream-tests / Test / testOnly org.apache.pekko.stream.FusingSpec" -- 20/20 passed
- sbt "stream / mimaReportBinaryIssues" -- passed
- sbt "bench-jmh / Jmh / run -wi 1 -i 2 -w 3s -r 3s -f 1 -p asyncBoundaries=1 .*AsyncBoundaryThroughputBenchmark.*" -- 3.59M ops/s (vs 3.55M on main, no regression)
References:
Fixes #3459
Report URL: https://github.com/apache/pekko/actions/runs/32704176575
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org