fix(spark): Fix shuffle cleanup failure with RssShuffleManager on Spark 4 - #2778
Merged
Conversation
wForget
marked this pull request as draft
August 11, 2026 13:52
Member
Author
|
Spark needs to call |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2778 +/- ##
============================================
- Coverage 51.79% 51.77% -0.02%
+ Complexity 3980 3979 -1
============================================
Files 599 600 +1
Lines 33216 33222 +6
Branches 3136 3136
============================================
- Hits 17204 17201 -3
- Misses 14894 14903 +9
Partials 1118 1118 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wForget
marked this pull request as ready for review
August 12, 2026 03:11
Member
Author
|
@LuciferYang Could you please take a look? |
Contributor
will give feedback today. |
LuciferYang
previously approved these changes
Aug 12, 2026
| RssShuffleManager shuffleManager = new RssShuffleManager(conf, true); | ||
| ShuffleBlockResolver blockResolver = shuffleManager.shuffleBlockResolver(); | ||
|
|
||
| assertTrue(blockResolver.getBlocksForShuffle(1, 1L).isEmpty()); |
Contributor
There was a problem hiding this comment.
Suggest adding an assertion like
assertThrowsExactly(RssException.class,
() -> blockResolver.getBlockData(new ShuffleBlockId(0, 0L, 0), Option.empty()));
LuciferYang
approved these changes
Aug 13, 2026
Contributor
|
Merged into master. Thank you @wForget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add a
ShuffleBlockResolverimplementation for the Spark 4RssShuffleManager.Because RSS does not store shuffle blocks on local disks, the resolver:
getBlocksForShuffle.stopimplementation.RssShuffleManager.shuffleBlockResolver()now returns this resolver instead of throwing an unsupported-operation exception.Why are the changes needed?
Spark 4 enables
spark.shuffle.service.removeShuffleby default. During shuffle cleanup, Spark callsshuffleBlockResolver().getBlocksForShuffle()to locate blocks managed by the external shuffle service.The previous RSS implementation threw an exception whenever
shuffleBlockResolver()was called, causingContextCleanerto report shuffle cleanup failures.Returning an empty block sequence is appropriate because RSS stores shuffle data remotely and has no local shuffle blocks for Spark to remove.
Fix: #2777
Does this PR introduce any user-facing change?
No
How was this patch tested?
Tested manually, and no exceptions were observed.