yl09099 commented on code in PR #1762:
URL:
https://github.com/apache/incubator-uniffle/pull/1762#discussion_r1625946319
##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -157,6 +157,36 @@ public void registerShuffle(
int shuffleId = req.getShuffleId();
String remoteStoragePath = req.getRemoteStorage().getPath();
String user = req.getUser();
+ int stageAttemptNumber = req.getStageAttemptNumber();
+
+ if (stageAttemptNumber > 0) {
+ ShuffleTaskInfo taskInfo =
shuffleServer.getShuffleTaskManager().getShuffleTaskInfo(appId);
+ int attemptNumber = taskInfo.getLatestStageAttemptNumber(shuffleId);
+ if (stageAttemptNumber > attemptNumber) {
+ taskInfo.refreshLatestStageAttemptNumber(shuffleId,
stageAttemptNumber);
+ try {
+ long start = System.currentTimeMillis();
+ shuffleServer.getShuffleTaskManager().removeShuffleDataSync(appId,
shuffleId);
+ LOG.info(
+ "Deleted the previous stage attempt data due to stage
recomputing for app: {}, "
+ + "shuffleId: {}. It costs {} ms",
+ appId,
+ shuffleId,
+ System.currentTimeMillis() - start);
+ } catch (Exception e) {
+ LOG.error(
Review Comment:
> If the exception is thrown, whether the client will fast fail? I think we
should make this fail rather than retry again
Related logic has been added.
--
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]