This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new bbfed507da6 [fix](schema-change) Make sc job state updated after the
table state is changed (#42670) (#43186)
bbfed507da6 is described below
commit bbfed507da6e0c7ef64b262e950856c686ae1b99
Author: Siyang Tang <[email protected]>
AuthorDate: Thu Nov 7 14:07:24 2024 +0800
[fix](schema-change) Make sc job state updated after the table state is
changed (#42670) (#43186)
pick: #42670
---
.../src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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 2c3004c25b8..f925752436f 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
@@ -591,14 +591,16 @@ public class SchemaChangeJobV2 extends AlterJobV2 {
}
pruneMeta();
- this.jobState = JobState.FINISHED;
- this.finishedTimeMs = System.currentTimeMillis();
- Env.getCurrentEnv().getEditLog().logAlterJob(this);
LOG.info("schema change job finished: {}", jobId);
changeTableState(dbId, tableId, OlapTableState.NORMAL);
LOG.info("set table's state to NORMAL, table id: {}, job id: {}",
tableId, jobId);
+
+ this.jobState = JobState.FINISHED;
+ this.finishedTimeMs = System.currentTimeMillis();
+ Env.getCurrentEnv().getEditLog().logAlterJob(this);
+
// Drop table column stats after schema change finished.
Env.getCurrentEnv().getAnalysisManager().dropStats(tbl);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]