You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Spark 4 streaming runner drops output when one shuffle feeds two stateful transforms #41297
In streaming mode the Spark 4 Structured Streaming runner can silently drop the output of a stateful transform. When one shuffle feeds two stateful transforms, for example a Reshuffle followed by two GroupByKeys, Spark reuses the shuffle for the second consumer. Spark 4.0.2 then gives the stateful operator above the reused shuffle no input watermark, so its event time timers never fire and its windows never close.
Reproduced on master: Create.of(1, 2, 3), WithKeys.of("k"), Reshuffle.of(), two GroupByKeys with a sum each, Flatten, PAssert expecting both sums. Only the first sum arrives, 2 of 2 runs. It also reproduces in plain Spark 4.0.2 with two transformWithState operators behind one reused exchange: the second fires 0 timers with spark.sql.exchange.reuse=true and all of them with false.
This is SPARK-60862, fixed in Spark 4.4.0 only. No released Spark version has the fix and the runner pins 4.0.2. Until the runner moves to a fixed Spark, it should disable exchange reuse for its streaming queries.
Activity
tkaymak commentedon Nov 13, 2026
.take-issue
[#41297] Spark 4 streaming: disable exchange reuse for streaming quer…