Skip to content

[spark] Shuffle output cleanup fails on concurrently unregistered shuffles - #10893

Open
taoran92 wants to merge 1 commit into
apache:masterfrom
taoran92:fix/spark-shuffle-cleanup-race
Open

taoran92 wants to merge 1 commit into
apache:masterfrom
taoran92:fix/spark-shuffle-cleanup-race

Conversation

@taoran92

@taoran92 taoran92 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Purpose

Fixes #10892.

RemoveOrphanBlobsProcedureTest can fail before its deletion assertions when a shuffle is unregistered between enumerating its ID and invalidating its outputs. Skip only the missing-shuffle error for the current ID and continue invalidating the remaining shuffles; propagate unrelated errors.

Retain shuffle output invalidation so the existing cache-eviction tests still exercise recomputation.

Tests

Added deterministic coverage for unregistering a captured shuffle ID, clearing the remaining registered shuffle, and propagating unrelated errors. The race regression fails without the missing-shuffle guard on Spark 3.5.8 and Spark 4.1.2.

ShuffleOutputCleanupTest (8 tests) and RemoveOrphanBlobsProcedureTest (21 tests) passed on all three combinations:

  • Spark 3.5.8 / Scala 2.12 / JDK 8.
  • Spark 3.5.8 / Scala 2.13 / JDK 8.
  • Spark 4.1.2 / Scala 2.13 / JDK 17.

@taoran92
taoran92 marked this pull request as ready for review October 30, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Spark blob cleanup test intermittently fails with a missing shuffle ID

1 participant