advancedxy commented on code in PR #428:
URL: https://github.com/apache/incubator-uniffle/pull/428#discussion_r1049795419


##########
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:
   Updated, please take a look when you have time.
   
   I was thinking refresh buffer id when `sendShuffleData`, but it doesn't seem 
performant.



-- 
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]

Reply via email to