jerqi commented on code in PR #428:
URL: https://github.com/apache/incubator-uniffle/pull/428#discussion_r1055017878
##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -258,6 +255,10 @@ public void sendShuffleData(SendShuffleDataRequest req,
break;
}
}
+ // since the required buffer id is only used once, the shuffle client
would try to require another buffer whether
+ // current connection succeeded or not. Therefore, the
preAllocatedBuffer is first get and removed, then after
+ // cacheShuffleData finishes, the preAllocatedSize should be updated
accordingly.
+ manager.releasePreAllocatedSize(info.getRequireSize());
Review Comment:
`info` may be null?
##########
server/src/test/resources/server.conf:
##########
@@ -26,3 +26,4 @@ rss.jetty.http.port 12345
rss.jetty.corePool.size 64
rss.server.heartbeat.timeout 1
rss.server.write.timeout 2000
+rss.server.shuffleBufferManager.trigger.flush.interval 500
Review Comment:
Add a new line.
##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -258,6 +255,10 @@ public void sendShuffleData(SendShuffleDataRequest req,
break;
}
}
+ // since the required buffer id is only used once, the shuffle client
would try to require another buffer whether
+ // current connection succeeded or not. Therefore, the
preAllocatedBuffer is first get and removed, then after
+ // cacheShuffleData finishes, the preAllocatedSize should be updated
accordingly.
+ manager.releasePreAllocatedSize(info.getRequireSize());
Review Comment:
Do we release `allocateMemory` in any other places? Is there conflicts if we
release the memory here?
--
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]