-
Notifications
You must be signed in to change notification settings - Fork 150
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
base: master
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this 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( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
+1
What are the possible policies? |
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