xianjingfeng commented on code in PR #428:
URL: https://github.com/apache/incubator-uniffle/pull/428#discussion_r1049595863
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -193,8 +193,14 @@ public boolean isPreAllocated(long requireBufferId) {
return requireBufferIds.containsKey(requireBufferId);
}
- public void removeRequireBufferId(long requireId) {
- requireBufferIds.remove(requireId);
+ public void removeRequireBufferId(long requireBufferId) {
+ PreAllocatedBufferInfo preAllocatedBuffer =
requireBufferIds.remove(requireBufferId);
+ if (preAllocatedBuffer != null) {
+ synchronized (preAllocatedBuffer) {
Review Comment:
Sorry, i didn't see it just now.
> So, if preAllocatedBufferCheck clean the require buffer when caching
blocks, `usedMemory` will be released twice.
But this problem seems to still exist.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]