Repository navigation
Conversation
… initialization failure Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 31/31 AI-Contributed/UT: 47/47
This branch has not been deployed
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?
Allocate the initial pointer array before starting DataPusher. If pusher initialization fails after the array allocation, release the array and return any borrowed push task queue.
JIRA: https://issues.apache.org/jira/browse/CELEBORN-2591
Why are the changes needed?
A SORT writer starts DataPusher before allocating its initial pointer array. If Spark cannot grant the full allocation, the constructor throws and does not return a writer that can close the pusher.
On Spark 3.5.9, two SORT pushers using the default 64 MiB threshold shared 12 MiB of managed off-heap memory. The first allocation used 8 MiB. The second received 4 MiB and threw SparkOutOfMemoryError, leaving its DataPusher thread alive. Releasing the first pusher allowed a subsequent construction to succeed. A local Spark shuffle with 4 MiB of off-heap execution memory reproduced four leftover threads after four failed task attempts.
Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
A SORT writer whose pointer allocation fails no longer leaves an idle background push thread.
How was this patch tested?
SortBasedPusherSuiteJ and ShuffleInMemorySorterSuiteJ passed.
dev/reformat build/mvn -B -ntp -Pspark-3.5 -pl client-spark/common -am test -Dtest=SortBasedPusherSuiteJ,ShuffleInMemorySorterSuiteJ -DwildcardSuites=org.apache.celeborn.NoMatchingScalaSuite -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false