Skip to content

[#2469] feat(spark): Create a unique ShuffleId for Uniffle for stage retry - #2471

Merged
zuston merged 4 commits into
apache:masterfrom
yl09099:uniffle-2649
May 9, 2025
Merged

[#2469] feat(spark): Create a unique ShuffleId for Uniffle for stage retry#2471
zuston merged 4 commits into
apache:masterfrom
yl09099:uniffle-2649

Conversation

@yl09099

@yl09099 yl09099 commented Apr 30, 2025

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Use the auto-incrementing shuffleId to replace the shuffleId of Spark. When Stage retry occurs, use the auto-incrementing shuffleId of Uniffle to avoid clearing the existing Shuffle data of the Shuffle Server.

Why are the changes needed?

Design doc:
https://docs.google.com/document/d/1TPxg4CUNklg26-JIcKCeIDwZb9lWKj3mIu-qjMcj0wU/edit?usp=sharing
Fix: #2470
Fix: #2469

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UT.

@github-actions

github-actions Bot commented Apr 30, 2025

Copy link
Copy Markdown

Test Results

 3 019 files  ±0   3 019 suites  ±0   6h 46m 57s ⏱️ +20s
 1 178 tests ±0   1 177 ✅ ±0   1 💤 ±0  0 ❌ ±0 
14 922 runs  ±0  14 907 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit 0674a19. ± Comparison against base commit 057dcd2.

♻️ This comment has been updated with latest results.

@yl09099
yl09099 force-pushed the uniffle-2649 branch 2 times, most recently from 7d59915 to 8a3d5a9 Compare May 5, 2025 06:19

@zuston zuston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm. Is this feature validated in your production cases?

Comment thread client-spark/common/src/main/java/org/apache/ShuffleIdMappingManager.java Outdated
@zuston

zuston commented May 6, 2025

Copy link
Copy Markdown
Member

And is this feature compatible with the older server version? I see some rpc params are ignored.

@zuston zuston changed the title [FEATURE] Create a unique ShuffleId for Uniffle to complete the Shuffle. [#2472] feat(spark): Create a unique ShuffleId for Uniffle for stage retry May 6, 2025
@yl09099

yl09099 commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

Overall lgtm. Is this feature validated in your production cases?

I have conducted integration tests and some tasks have been launched.

@yl09099

yl09099 commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

And is this feature compatible with the older server version? I see some rpc params are ignored.

I'm rather confused about this. Because when registering the Shuffle Server, the attributes related to Stage should not be involved. Therefore, the information of Stage should not appear during the registration stage. So I deleted them.

@yl09099 yl09099 changed the title [#2472] feat(spark): Create a unique ShuffleId for Uniffle for stage retry [#2469] feat(spark): Create a unique ShuffleId for Uniffle for stage retry May 6, 2025
yl09099 added a commit to yl09099/incubator-uniffle that referenced this pull request May 7, 2025
yl09099 added a commit to yl09099/incubator-uniffle that referenced this pull request May 7, 2025
* @param shuffleId
* @return
*/
public int createUniffleShuffleId(int shuffleId, String appShuffleIdentifier) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the appShuffleIdentifier

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the appShuffleIdentifier

I add some annotations. It is the combination of shuffle_stageId_stageAttemptNumber.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, I think it's not a good practise to use a simple string to declare this meaning. How about creating a independent class to involve this meaning?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, I think it's not a good practise to use a simple string to declare this meaning. How about creating a independent class to involve this meaning?

This unique scalar only serves an identification function and involves no business logic calculation. Isn't it a bit heavy to create a separate class.

@zuston zuston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I will merge this if no rejection.

Please go forward for next PRs.

@zuston
zuston merged commit cc440df into apache:master May 9, 2025
@zuston

zuston commented May 9, 2025

Copy link
Copy Markdown
Member

Merged @yl09099 . Thanks

@roryqi

roryqi commented May 9, 2025

Copy link
Copy Markdown
Contributor

Will this feature affect the exchange reuse?

@zuston

zuston commented May 12, 2025

Copy link
Copy Markdown
Member

Will this feature affect the exchange reuse?

I missed this part compatibility. Could you help check this? @yl09099

@yl09099

yl09099 commented May 12, 2025

Copy link
Copy Markdown
Contributor Author

Will this feature affect the exchange reuse?

I missed this part compatibility. Could you help check this? @yl09099

This point was not taken into consideration. Let me confirm it later.

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.

[Umbrella] Re-run Spark Stage for Uniffle Shuffle Fetch Failure. [FEATURE] Create a unique ShuffleId for Uniffle to complete the Shuffle.

3 participants