Repository navigation
[GLUTEN-12743][VL] Avoid blocking on failed Delta statistics workers - #13678
zhztheplayer merged 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the Delta statistics worker-failure handling changes.
No open issues 🎉
What changed in this PR
This focused follow-up to #13578 prevents Velox Delta statistics producers from blocking indefinitely when a worker fails, covering both Delta 3.3 and Delta 4.
Changes:
- Share timed queue offers and worker-failure checks between batch submission and end-of-stream signaling.
- Preserve backpressure, interruptibility, and retained-batch cleanup when submission fails.
- Add bounded regressions for worker failures before and during submission, checking exception propagation, batch ownership, and resource cleanup.
| File | Description |
|---|---|
| backends-velox/src-delta4/main/scala/org/apache/spark/sql/delta/stats/GlutenDeltaJobStatsTracker.scala | Use failure-aware enqueue logic for Delta 4 batches and end-of-stream signals. |
| backends-velox/src-delta33/test/scala/org/apache/spark/sql/delta/GlutenDeltaStatsLifecycleSuite.scala | Add two bounded worker-failure lifecycle regressions. |
| backends-velox/src-delta33/main/scala/org/apache/spark/sql/delta/stats/GlutenDeltaJobStatsTracker.scala | Apply the same failure-aware enqueue logic to Delta 3.3. |
Review effort: Balanced
|
Hi @malinjawi @zhztheplayer @philo-he, could you review #13678? This addresses the blocking The regressions cover worker failure before and during submission. All five lifecycle tests pass on both Delta variants; restoring the old implementation reproduces both failures without hanging the test JVM. Thanks! |
malinjawi
left a comment
There was a problem hiding this comment.
LGTM, just one non-blocking nit.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
What changes are proposed in this pull request?
Relates to #12743. This is the focused follow-up to the blocking
newRow.put()review on #13578 and the follow-up acknowledgment.finally.closeFile()or sending end-of-stream, addressing the review feedback. After a valid native batch is consumed, a deliberately non-offloaded batch fails in the actual worker's input iterator. The nextnewRow()must surface that failure and release its retained batch reference; task completion must also release the worker-owned input.This branch starts directly from upstream
mainatcb154e189, which includes merged #13578. Task-completion listener ordering and worker-before-native-resource cleanup are unchanged; the unbounded shutdown wait is deliberately out of scope. No fallback, fixture, configuration, or quarantine changes are included. Complementary #13510 also touches the two trackers and remains a separate unsupported-statistics-plan fallback change.How was this patch tested?
Actual Maven-backed execution of
org.apache.spark.sql.delta.GlutenDeltaStatsLifecycleSuitein isolated Linux source exports under WSL Ubuntu-24.04, usingapache/gluten:centos-9-jdk17:newRowdeadlinenewRowdeadlineFor each negative control, only the production trackers in isolated validation copies were temporarily reverted to their original implementation; the published branch was not reverted. Both test JVMs exited normally rather than hanging. Reapplying the fix made all six tests pass again, including the existing successful-write, aborted-write, and cancellation/registry-lock tests. The final tested source blobs match
aef2d8fc3.Representative commands (both profile sets were built and tested; the test-only review update reused the matching installed sibling modules):
./build/mvn -B -q install -pl backends-velox -am \ -Pfast-build,backends-velox,spark-3.5,scala-2.12,java-17,delta,spark-ut \ -Dmaven.compiler.release=17 -DskipTests ./build/mvn -B -q test-compile scalatest:test -pl backends-velox \ -Pfast-build,backends-velox,spark-3.5,scala-2.12,java-17,delta,spark-ut \ -Dmaven.compiler.release=17 \ -DwildcardSuites=org.apache.spark.sql.delta.GlutenDeltaStatsLifecycleSuite \ -DargLine=-Dspark.test.home=/opt/shims/spark35/spark_home # Repeat with spark-4.1, scala-2.13, and /opt/shims/spark41/spark_home. ./dev/format-scala-code.sh ./dev/format-scala-code.sh check ./.github/workflows/util/check.py header main --fixFormatting and license checks passed. Native libraries were downloaded for the original validation from successful native build 134590129323, artifact
14400261816, built atad96f33f7with Velox67fa1bbee62e9f8752b3c34cc92f179022cd2ac6, and reused for this test-only update after verifying their hashes. The comparison to this branch'scb154e189base contains only unrelated Bolt/ClickHouse tests, so native source/build inputs match. Native libraries were not rebuilt locally. The full upstream Delta/Spark test matrix was not run locally for this revision; there are no remaining blockers for the focused validation.Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot CLI 1.0.106-8.unstable.r43566476370.g869eef3 (GPT-6 Astra)