Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2111] improvement(client): cleanup the useless shuffle server clients when unregister shuffle #2112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xianjingfeng
Copy link
Member

@xianjingfeng xianjingfeng commented Sep 11, 2024

What changes were proposed in this pull request?

Cleanup useless the shuffle server clients when unregister shuffle

Why are the changes needed?

Fix: #2111

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UT

Copy link

github-actions bot commented Sep 11, 2024

Test Results

 2 897 files  +15   2 897 suites  +15   5h 57m 4s ⏱️ +22s
 1 020 tests + 1   1 019 ✅ + 1   1 💤 ±0  0 ❌ ±0 
12 883 runs  +15  12 868 ✅ +15  15 💤 ±0  0 ❌ ±0 

Results for commit 3e4dbf9. ± Comparison against base commit d170004.

♻️ This comment has been updated with latest results.

@jerqi
Copy link
Contributor

jerqi commented Sep 13, 2024

What will it happen if we don't have this patch?

@xianjingfeng
Copy link
Member Author

xianjingfeng commented Sep 14, 2024

What will it happen if we don't have this patch?

If there are many stages in a application, the client will keep the clients for all shuffle servers, which will waste memory.

@jerqi
Copy link
Contributor

jerqi commented Sep 14, 2024

What will it happen if we don't have this patch?

If there are many stages in a application, the client will keep the clients for all shuffle servers, which will waste memory.

One server may be used by multiple stages. We can't remove it if only one stage is finished.

@xianjingfeng
Copy link
Member Author

What will it happen if we don't have this patch?

If there are many stages in a application, the client will keep the clients for all shuffle servers, which will waste memory.

One server may be used by multiple stages. We can't remove it if only one stage is finished.

Right, not all the shuffle servers will be deleted in this PR

@xianjingfeng xianjingfeng changed the title [#2111] improvement(client): cleanup shuffle server client when unregister shuffle [#2111] improvement(client): cleanup useless shuffle server client when unregister shuffle Sep 14, 2024
@xianjingfeng xianjingfeng changed the title [#2111] improvement(client): cleanup useless shuffle server client when unregister shuffle [#2111] improvement(client): cleanup useless the shuffle server clients when unregister shuffle Sep 14, 2024
@xianjingfeng xianjingfeng changed the title [#2111] improvement(client): cleanup useless the shuffle server clients when unregister shuffle [#2111] improvement(client): cleanup the useless shuffle server clients when unregister shuffle Sep 14, 2024
Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

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

Emm. I think we should have the more graceful way to close the shuffle-server clients.

For my sight, I hope the closing way should be optional, which can be implemented by the pluggable closable policies.

@@ -75,9 +80,30 @@ public synchronized ShuffleServerClient getShuffleServerClient(
return serverToClients.get(shuffleServerInfo);
}

public synchronized void cleanUselessShuffleServerClients(
Copy link
Member

Choose a reason for hiding this comment

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

Is is possible that the another thread to hold the removing client?

Copy link
Member Author

@xianjingfeng xianjingfeng Sep 19, 2024

Choose a reason for hiding this comment

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

I think it is impossible, if another thread hold the removing client, the shuffleServerInfo of the removing client will always be in shuffleServerInfoMap.

@xianjingfeng
Copy link
Member Author

I hope the closing way should be optional,

+1

which can be implemented by the pluggable closable policies.

What are the possible policies?

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.

[Improvement] cleanup shuffle server client when unregister shuffle
3 participants