This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7e06b83687d [fix](schema-change) Make sc job state updated after the
table state is changed (#42670)
7e06b83687d is described below
commit 7e06b83687d9ec558bd88288e95e1c21568ea9af
Author: Siyang Tang <[email protected]>
AuthorDate: Tue Oct 29 22:31:59 2024 +0800
[fix](schema-change) Make sc job state updated after the table state is
changed (#42670)
Similar to #39327
Note that schema change job state and table state should be atomic and
persistent, but neither is ensured by current implementation. We should
optimize this point in the future.
---
.../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 3d3c0761f5b..c8754aa5d62 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
@@ -667,14 +667,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);
+
postProcessOriginIndex();
// Drop table column stats after schema change finished.
Env.getCurrentEnv().getAnalysisManager().dropStats(tbl, null);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]