[CELEBORN-2331] Parallelize batch open stream client creation#3692
Draft
sunchao wants to merge 1 commit into
Draft
[CELEBORN-2331] Parallelize batch open stream client creation#3692sunchao wants to merge 1 commit into
sunchao wants to merge 1 commit into
Conversation
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.
Why are the changes needed?
CelebornShuffleReadercreates data clients serially for each distinct worker before the existing parallelBATCH_OPEN_STREAMphase. If one or more worker endpoints are slow or unavailable, a reducer can pay those connection retry costs worker-by-worker before it even starts opening streams.That means the overall open-stream setup can still be delayed by connection establishment even though the later batch-open RPCs are already parallelized. The slow path becomes most visible when a reducer needs data from multiple workers and one of those workers is slow to accept or establish a data-client connection.
What changes were proposed in this PR?
This PR keeps the existing batch-open protocol, but changes how the reader prepares for it.
Before this change, the reader walked partition locations and immediately created a data client the first time it saw each worker. That meant worker A had to finish client creation before the reader even attempted client creation for worker B, and so on. Only after that serial setup step completed would Celeborn submit the
BATCH_OPEN_STREAMrequests in parallel.The new flow first groups pending open-stream locations by worker address. Once that worker-level view is available, the reader creates one data client per distinct worker in parallel using the existing stream creator pool. This keeps concurrency bounded by the same executor that already controls stream-opening work, while removing the unnecessary worker-by-worker wait during client creation.
After client creation completes, the reader builds each worker's
BATCH_OPEN_STREAMrequest only for workers whose data client was created successfully. If one worker fails during client creation, Celeborn preserves the current failed-location exclusion behavior for that worker and still proceeds with healthy workers, so one bad endpoint does not prevent useful setup work from continuing elsewhere.The tests cover both important behaviors introduced by the refactor: client creation starts concurrently across workers, and a failed worker is skipped without dropping the successful clients created for other workers.
How was this PR tested?
build/mvn -Pgoogle-mirror,spark-3.3 -pl client-spark/spark-3 spotless:applybuild/mvn -Pgoogle-mirror,spark-3.5 -pl client-spark/spark-3 -am -DskipTests installbuild/mvn -Pgoogle-mirror,spark-3.5 -pl client-spark/spark-3 -Dtest=CelebornShuffleReaderSuite test