xianjingfeng commented on code in PR #2531:
URL: https://github.com/apache/uniffle/pull/2531#discussion_r2176790055


##########
server/src/main/java/org/apache/uniffle/server/buffer/lab/ChunkCreator.java:
##########
@@ -126,12 +129,43 @@ Chunk getChunk(int size) {
   private Chunk createChunk(boolean pool, int size) {
     Chunk chunk;
     int id = chunkID.getAndIncrement();
+    // if chunkID overflow
+    if (id <= 0) {
+      id = handleChunkIdOverflow();

Review Comment:
   `reclaimedChunks` doesn't contain all chunks of the pool. In fact, you can 
also achieve it like this.
   ```suggestion
         chunkID.compareAndSet(id, chunksPool.maxCount + 1);
         id = chunkID.getAndIncrement();
   ```



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