diff --git a/fe/fe-core/src/main/java/com/starrocks/alter/AlterJobV2.java b/fe/fe-core/src/main/java/com/starrocks/alter/AlterJobV2.java index e10426c0ad589..96318342448f5 100644 --- a/fe/fe-core/src/main/java/com/starrocks/alter/AlterJobV2.java +++ b/fe/fe-core/src/main/java/com/starrocks/alter/AlterJobV2.java @@ -223,8 +223,12 @@ public long getWarehouseId() { */ public synchronized void run() { if (isTimeout()) { - cancelHook(cancelImpl("Timeout")); - return; + bool cancelled = cancelImpl("Timeout"); + cancelHook(cancelled); + if (cancelled) { + // If this job can't be cancelled, we should execute it. + return; + } } // create connectcontext diff --git a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java index 2ff33e541d59c..0e62624e58f75 100644 --- a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java +++ b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java @@ -2110,7 +2110,7 @@ public AlterJobV2 createAlterMetaJob(AlterClause alterClause, Database db, OlapT long timeoutSecond = PropertyAnalyzer.analyzeTimeout(properties, Config.alter_table_timeout_second); alterMetaJob = new LakeTableAlterMetaJob(GlobalStateMgr.getCurrentState().getNextId(), db.getId(), - olapTable.getId(), olapTable.getName(), timeoutSecond, + olapTable.getId(), olapTable.getName(), timeoutSecond * 1000 /* should be ms*/, TTabletMetaType.ENABLE_PERSISTENT_INDEX, enablePersistentIndex, persistentIndexType); } else { // shouldn't happen