diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java index 111bfbce1f7fab..c1ee64760ad5ba 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java +++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java @@ -749,11 +749,11 @@ protected synchronized boolean cancelImpl(String errMsg) { pruneMeta(); this.errMsg = errMsg; this.finishedTimeMs = System.currentTimeMillis(); - LOG.info("cancel {} job {}, err: {}", this.type, jobId, errMsg); - Env.getCurrentEnv().getEditLog().logAlterJob(this); - changeTableState(dbId, tableId, OlapTableState.NORMAL); LOG.info("set table's state to NORMAL when cancel, table id: {}, job id: {}", tableId, jobId); + jobState = JobState.CANCELLED; + Env.getCurrentEnv().getEditLog().logAlterJob(this); + LOG.info("cancel {} job {}, err: {}", this.type, jobId, errMsg); postProcessShadowIndex(); return true; @@ -791,8 +791,6 @@ private void cancelInternal() { } } } - - jobState = JobState.CANCELLED; } // Check whether transactions of the given database which txnId is less than 'watershedTxnId' are finished