xianjingfeng commented on code in PR #1931:
URL: 
https://github.com/apache/incubator-uniffle/pull/1931#discussion_r1704987271


##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java:
##########
@@ -111,8 +111,26 @@ public int getBlockCount() {
   }
 
   @Override
-  public void release() {
-    blocksMap.values().forEach(spb -> spb.getData().release());
+  public long release() {

Review Comment:
   > `toFlushEvent` method do not release buf, the buf released by a thread 
start by `ProcessEventThread` thread
   
   I know this.
   
   
   > it guarded by `app read lock`
   
   I don't get this point.
   
   And is it possible that the following case?
   
   1.  Thread-1( toFlushEvent): List<ShufflePartitionedBlock> spBlocks = new 
LinkedList<>(blocks);
   2. Thread-2(release): blocks.forEach(spb -> spb.getData().release());  (The 
first release)
   3. Thread-1( toFlushEvent): blocks.clear();
   4. Thread-3 (DefaultFlushEventHandler#dispatchEvent) (The second release)



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