You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "xianjingfeng (via GitHub)" <gi...@apache.org> on 2025/07/01 08:20:33 UTC
Re: [PR] [#2526] improvement: Reset the chunkID if it is overflow [uniffle]
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: issues-unsubscribe@uniffle.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org