[CELEBORN-1152] fix GetShuffleId RPC NPE for empty shuffle#2136
Closed
ErikFang wants to merge 2 commits intoapache:mainfrom
ErikFang:fix-GetShuffleId-RPC-NPE-for-empty-shuffle
Closed
[CELEBORN-1152] fix GetShuffleId RPC NPE for empty shuffle#2136ErikFang wants to merge 2 commits intoapache:mainfrom ErikFang:fix-GetShuffleId-RPC-NPE-for-empty-shuffle
ErikFang wants to merge 2 commits intoapache:mainfrom
ErikFang:fix-GetShuffleId-RPC-NPE-for-empty-shuffle
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2136 +/- ##
==========================================
+ Coverage 46.21% 46.36% +0.16%
==========================================
Files 175 175
Lines 11341 11358 +17
Branches 1017 1019 +2
==========================================
+ Hits 5240 5265 +25
+ Misses 5753 5740 -13
- Partials 348 353 +5 ☔ View full report in Codecov by Sentry. |
waitinfuture
reviewed
Dec 9, 2023
| if (shuffleIds == null) { | ||
| logWarning(s"unknown appShuffleId $appShuffleId, maybe no shuffle data for this shuffle") | ||
| val pbGetShuffleIdResponse = | ||
| PbGetShuffleIdResponse.newBuilder().setShuffleId(UNKNOWN_APP_SHUFFLE_ID).build() |
Contributor
There was a problem hiding this comment.
We can short-circuit ShuffleClientImpl#readPartition if partitionId is -1 and return CelebornInputStream.empty() without calling loadFileGroup(shuffleId, partitionId)
waitinfuture
approved these changes
Dec 11, 2023
Contributor
waitinfuture
left a comment
There was a problem hiding this comment.
LGTM, thanks! Merging to main(v0.4.0)
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?
In celeborn-955, GetShuffleId RPC was introduced to generate a celeborn shuffle id from app shuffle id to support spark stage rerun
GetShuffleId RPC assumes that Shuffle Write operation always happens before Shuffle Read operation, but this is not true for empty shuffle data in celeborn, which causes GetShuffleId RPC to throw NPE and fail the Job
This PR fixes this bug
Why are the changes needed?
to avoid spark job failure with empty shuffle data
Does this PR introduce any user-facing change?
No
How was this patch tested?
a new test case is included for empty shuffle data