This is an automated email from the ASF dual-hosted git repository.

xianjingfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new bb06eeb52 [#2059][FLOLLOWUP]fix[server] fix spotless error (#2184)
bb06eeb52 is described below

commit bb06eeb52b7a1229f2c8270099ea8cf552ed11dc
Author: leewish <[email protected]>
AuthorDate: Tue Oct 15 16:09:23 2024 +0800

    [#2059][FLOLLOWUP]fix[server] fix spotless error (#2184)
    
    ### What changes were proposed in this pull request?
    
    ### Why are the changes needed?
    Fix: #2061
    
    ### Does this PR introduce any user-facing change?
    No.
    
    ### How was this patch tested?
    CI
---
 .../server/buffer/ShuffleBufferWithSkipList.java   | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
 
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
index 726c30d3a..57d2b1982 100644
--- 
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
+++ 
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
@@ -64,18 +64,18 @@ public class ShuffleBufferWithSkipList extends 
AbstractShuffleBuffer {
     }
     long currentSize = 0;
 
-      for (ShufflePartitionedBlock block : data.getBlockList()) {
-        // If sendShuffleData retried, we may receive duplicate block. The 
duplicate
-        // block would gc without release. Here we must release the duplicated 
block.
-        if (!blocksMap.containsKey(block.getBlockId())) {
-          blocksMap.put(block.getBlockId(), block);
-          blockCount++;
-          currentSize += block.getEncodedLength();
-        } else {
-          block.getData().release();
-        }
+    for (ShufflePartitionedBlock block : data.getBlockList()) {
+      // If sendShuffleData retried, we may receive duplicate block. The 
duplicate
+      // block would gc without release. Here we must release the duplicated 
block.
+      if (!blocksMap.containsKey(block.getBlockId())) {
+        blocksMap.put(block.getBlockId(), block);
+        blockCount++;
+        currentSize += block.getEncodedLength();
+      } else {
+        block.getData().release();
       }
-      this.size += currentSize;
+    }
+    this.size += currentSize;
 
     return currentSize;
   }

Reply via email to