From 8d08430d6a4b79104c6a46f4122a1a006d766cb3 Mon Sep 17 00:00:00 2001 From: Napoleon Date: Mon, 1 Aug 2022 10:54:24 +0800 Subject: [PATCH] [BugFix] Fix the incomplete ok semantic in runPendingJob (#9160) The code paths will not enter the right branch when the status of countDownLatch is not ok. If BE failed to create tablet, runPendingJob will transform to next phase as normal, it's not ok. Instead this case should throw an AlterCancelException. --- .../src/main/java/com/starrocks/alter/SchemaChangeJobV2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeJobV2.java b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeJobV2.java index 502384e1832ef..8989d4a1cb179 100644 --- a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeJobV2.java +++ b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeJobV2.java @@ -307,7 +307,7 @@ protected void runPendingJob() throws AlterCancelException { Config.max_create_table_timeout_second * 1000L); boolean ok = false; try { - ok = countDownLatch.await(timeout, TimeUnit.MILLISECONDS); + ok = countDownLatch.await(timeout, TimeUnit.MILLISECONDS) && countDownLatch.getStatus().ok(); } catch (InterruptedException e) { LOG.warn("InterruptedException: ", e); ok = false;