jerqi commented on code in PR #1610:
URL:
https://github.com/apache/incubator-uniffle/pull/1610#discussion_r1547111476
##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/writer/RssShuffleWriter.java:
##########
@@ -363,6 +367,34 @@ protected List<CompletableFuture<Long>> postBlockEvent(
List<ShuffleBlockInfo> shuffleBlockInfoList) {
List<CompletableFuture<Long>> futures = new ArrayList<>();
for (AddBlockEvent event :
bufferManager.buildBlockEvents(shuffleBlockInfoList)) {
+ if (isBlockFailSentRetryEnabled) {
+ FailedBlockSendTracker tracker =
shuffleManager.getBlockIdsFailedSendTracker(taskId);
+ event.withBlockProcessedCallback(
+ (block, isSuccessful) -> {
+ if (isSuccessful) {
+ bufferManager.freeAllocatedMemory(block.getFreeMemory());
+ block.getData().release();
+ return;
+ }
+
+ // for the exceeding max send retry blocks, we should release
its data and allocated
+ // memory.
+ List<TrackingBlockStatus> record =
tracker.getFailedBlockStatus(block.getBlockId());
+ if (CollectionUtils.isEmpty(record)) {
+ LOG.error(
Review Comment:
Do we need to add an assert here?
--
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]