Skip to content

Commit

Permalink
[BugFix] fix ingestion hang because of alter job timeout
Browse files Browse the repository at this point in the history
Signed-off-by: luohaha <[email protected]>
  • Loading branch information
luohaha committed Jan 17, 2025
1 parent 5efdbcf commit 3bfc399
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions fe/fe-core/src/main/java/com/starrocks/alter/AlterJobV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bfc399

Please sign in to comment.