xianjingfeng commented on code in PR #2531: URL: https://github.com/apache/uniffle/pull/2531#discussion_r2174155586
########## server/src/main/java/org/apache/uniffle/server/buffer/lab/ChunkCreator.java: ########## @@ -126,6 +126,13 @@ Chunk getChunk(int size) { private Chunk createChunk(boolean pool, int size) { Chunk chunk; int id = chunkID.getAndIncrement(); + // if chunkID overflow + if (id <= 0) { + int maxChunkId = chunkIdMap.keySet().stream().mapToInt(Integer::intValue).max().orElse(0); Review Comment: `chunkIdMap` contains the chunk not in the chunk pool. Besides this is not thread-safe. -- 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: issues-unsubscr...@uniffle.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@uniffle.apache.org For additional commands, e-mail: issues-h...@uniffle.apache.org