Skip to content

Commit 69de616

Browse files
[BugFix] Make TaskRun's status be compatible with lower version (backport StarRocks#61076) (StarRocks#61077)
Signed-off-by: shuming.li <[email protected]> Co-authored-by: shuming.li <[email protected]>
1 parent 37ea4f3 commit 69de616

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fe/fe-core/src/main/java/com/starrocks/scheduler/TaskManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,13 @@ public void saveTasksV2(ImageWriter imageWriter) throws IOException, SRMetaBlock
592592

593593
writer.writeInt(runStatusList.size());
594594
for (TaskRunStatus status : runStatusList) {
595+
// TODO: This is to be compatible with the old version of TaskRunStatus when degraded from a higher version
596+
// because SKIPPED state is not defined in the lower version.
597+
// NOTE: This can be removed in the next 3.4 version release.
598+
if (status.getState() != null && status.getState().equals(Constants.TaskRunState.SKIPPED)) {
599+
status.setState(Constants.TaskRunState.SUCCESS);
600+
LOG.warn("TaskRunStatus state is SKIPPED, change to SUCCESS, status: {}", status);
601+
}
595602
writer.writeJson(status);
596603
}
597604

0 commit comments

Comments
 (0)