zhouyejoe commented on code in PR #35906:
URL: https://github.com/apache/spark/pull/35906#discussion_r896279364
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -350,15 +415,27 @@ void closeAndDeletePartitionFilesIfNeeded(
* up older shuffleMergeId partitions. The cleanup will be executed in a
separate thread.
*/
@VisibleForTesting
- void closeAndDeletePartitionFiles(Map<Integer, AppShufflePartitionInfo>
partitions) {
+ void closeAndDeleteOutdatedPartitions(Map<Integer, AppShufflePartitionInfo>
partitions) {
partitions
.forEach((partitionId, partitionInfo) -> {
synchronized (partitionInfo) {
partitionInfo.closeAllFilesAndDeleteIfNeeded(true);
+
removeAppShufflePartitionInfoFromDB(partitionInfo.appAttemptShuffleMergeId);
Review Comment:
Refactored the signature of closeAndDeleteOutdatedPartitions by adding the
AppAttemptShuffleMergeId, since every time it is getting called, there is going
to only one call to remove the finalized partitionInfo from DB with the key
AppAttemptShuffleMergeId.
--
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]