wForget commented on code in PR #2745:
URL: https://github.com/apache/uniffle/pull/2745#discussion_r2993661487
##########
client/src/main/java/org/apache/uniffle/client/impl/DecompressionWorker.java:
##########
@@ -154,10 +154,30 @@ public void add(int batchIndex, ShuffleDataResult
shuffleDataResult) {
}
public DecompressedShuffleBlock get(int batchIndex, int segmentIndex) {
+ // guardedly safe to remove the previous batches if exist since the
upstream will fetch the
+ // segments in order
+ for (int i = 0; i < batchIndex; i++) {
+ ConcurrentHashMap<Integer, DecompressedShuffleBlock> prevBlocks =
tasks.remove(i);
+ if (prevBlocks != null) {
+ for (DecompressedShuffleBlock block : prevBlocks.values()) {
Review Comment:
nit: segmentPermits.ifPresent(x -> x.release(prevBlocks.values().size()));
--
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]