LuciferYang commented on code in PR #43371:
URL: https://github.com/apache/spark/pull/43371#discussion_r1360165594
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -537,7 +540,9 @@ void closeAndDeleteOutdatedPartitions(
partitions
.forEach((partitionId, partitionInfo) -> {
synchronized (partitionInfo) {
- partitionInfo.closeAllFilesAndDeleteIfNeeded(true);
+ AppShufflePartitionInfo.closeAllFilesAndDeleteIfNeeded(true,
partitionInfo.dataFile,
Review Comment:
```
CLEANER.register(this, new ResourceCleaner(dataFile, dataChannel, indexFile,
metaFile, appAttemptShuffleMergeId, reduceId));
```
Maybe we can assign it to `Cleaner.Cleanable cleanable`, and then we can
change this to call `partitionInfo.cleanable.clean();` there.
And then, IIRC, if `partitionInfo.cleanable.clean();` is called manually,`
ResouceCleaner.run` will not be executed repeatedly.
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -822,7 +827,9 @@ public MergeStatuses
finalizeShuffleMerge(FinalizeShuffleMerge msg) {
msg.appAttemptId, msg.shuffleId, msg.shuffleMergeId,
partition.reduceId,
ioe.getMessage());
} finally {
- partition.closeAllFilesAndDeleteIfNeeded(false);
+ AppShufflePartitionInfo.closeAllFilesAndDeleteIfNeeded(false,
partition.dataFile,
Review Comment:
```
CLEANER.register(this, new ResourceCleaner(dataFile, dataChannel, indexFile,
metaFile, appAttemptShuffleMergeId, reduceId));
```
Maybe we can assign it to `Cleaner.Cleanable cleanable`, and then we can
change this to call `partitionInfo.cleanable.clean();` there.
And then, IIRC, if `partitionInfo.cleanable.clean();` is called manually,`
ResouceCleaner.run` will not be executed repeatedly.
--
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]