Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix][Zeta] Fix job can not restore when last checkpoint failed #6193

Merged
merged 10 commits into from
Jan 17, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,20 @@ public boolean isCompleted() {
&& !latestCompletedCheckpoint.isRestored();
}

public boolean isNoErrorCompleted() {
if (latestCompletedCheckpoint == null) {
return false;
}
return latestCompletedCheckpoint.getCheckpointType().isFinalCheckpoint()
&& (runningJobStateIMap
.get(checkpointStateImapKey)
.equals(CheckpointCoordinatorStatus.FINISHED)
|| runningJobStateIMap
.get(checkpointStateImapKey)
.equals(CheckpointCoordinatorStatus.SUSPEND))
EricJoy2048 marked this conversation as resolved.
Show resolved Hide resolved
&& !latestCompletedCheckpoint.isRestored();
}

public boolean isEndOfSavePoint() {
if (latestCompletedCheckpoint == null) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public CompletableFuture<Void> shutdown(JobStatus jobStatus) {
* the pipeline has been completed;
*/
public boolean isCompletedPipeline(int pipelineId) {
return getCheckpointCoordinator(pipelineId).isCompleted();
return getCheckpointCoordinator(pipelineId).isNoErrorCompleted();
}

/**
Expand Down
Loading