zhouyejoe commented on code in PR #35906:
URL: https://github.com/apache/spark/pull/35906#discussion_r898266509


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -576,6 +661,7 @@ public MergeStatuses 
finalizeShuffleMerge(FinalizeShuffleMerge msg) {
           } finally {
             partition.closeAllFilesAndDeleteIfNeeded(false);
           }
+          
cleanUpAppShufflePartitionInfoInDB(partition.appAttemptShuffleMergeId);

Review Comment:
   Figured out the issue. It is not a bug within the RemoteBlockPushResolver, 
but the UT was not triggering this part of the code path. It is missing one 
shuffle merge partition preparation after a service restart. Since 
non-finalized shuffle merge will not be written into DB, during restart, there 
will be empty entry for the ShuffleMergedPartitions. In order to trigger this 
code path, other than directly calling finalizeShuffleMerge, we should call the 
prepareAppShufflePartition again, as shown in [this 
commit](https://github.com/apache/spark/pull/35906/commits/7b697e3166854d0df8fd8701baef5de4cde64fc1),
 and then call the finalizeShuffleMerge. The UT will walk through this part of 
the code. I enhanced the UT as shown in the commit, and if I added the cleanup 
DB operation, same as shown in this comment, the current UT will fail. Thanks 
for catching this issue.



-- 
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]

Reply via email to