Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](routine load) write edit log when rescheduled job (#40728)
``` 2024-09-11 20:00:53,079 ERROR (replayer|105) [RoutineLoadManager.replayChangeRoutineLoadJob():836] should not happened org.apache.doris.common.DdlException: errCode = 2, detailMessage = Could not transform PAUSED to PAUSED at org.apache.doris.load.routineload.RoutineLoadJob.checkStateTransform(RoutineLoadJob.java:855) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.load.routineload.RoutineLoadJob.unprotectUpdateState(RoutineLoadJob.java:1407) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.load.routineload.RoutineLoadJob.updateState(RoutineLoadJob.java:1394) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.load.routineload.RoutineLoadManager.replayChangeRoutineLoadJob(RoutineLoadManager.java:834) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:717) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.Env.replayJournal(Env.java:2913) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2675) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT] ``` `unprotectNeedReschedule()` will change job state to `JobState.NEED_SCHEDULE` without `logOpRoutineLoadJob`.If job is paused then rescheduled and paused finally, the record of two consecutive edit logs will be 'PAUSED', the correct replay sequence should be: `PAUSED` -> `NEED_SCHEDULE` ->` PAUSED`. Therefore, it is need to write edit log when rescheduled job.
- Loading branch information