From bfade569c9d3800049e94b6cb9aecdafef9a85ea Mon Sep 17 00:00:00 2001 From: meiyi Date: Sat, 30 Nov 2024 12:58:03 +0800 Subject: [PATCH] r --- .../main/java/org/apache/doris/master/MasterImpl.java | 6 +++--- .../test_schema_change_and_compaction.out | 5 +++-- .../test_schema_change_and_compaction.groovy | 9 ++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java index 4010a9b564d0a0e..09318af34bd3815 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java @@ -681,9 +681,9 @@ private void finishCalcDeleteBitmap(AgentTask task, TFinishTaskRequest request) CalcDeleteBitmapTask calcDeleteBitmapTask = (CalcDeleteBitmapTask) task; if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) { calcDeleteBitmapTask.countDownToZero(request.getTaskStatus().getStatusCode(), - "backend: " + task.getBackendId() + ", error_tablet_size: " - + request.getErrorTabletIdsSize() + ", err_msg: " - + request.getTaskStatus().getErrorMsgs().toString()); + "backend: " + task.getBackendId() + ", error_tablet_size: " + request.getErrorTabletIdsSize() + + ", error_tablets: " + request.getErrorTabletIds() + + ", err_msg: " + request.getTaskStatus().getErrorMsgs().toString()); } else if (request.isSetRespPartitions() && calcDeleteBitmapTask.isFinishRequestStale(request.getRespPartitions())) { LOG.warn("get staled response from backend: {}, report version: {}. calcDeleteBitmapTask's" diff --git a/regression-test/data/unique_with_mow_c_p0/test_schema_change_and_compaction.out b/regression-test/data/unique_with_mow_c_p0/test_schema_change_and_compaction.out index 60355c1275e460a..4f63ade14c87637 100644 --- a/regression-test/data/unique_with_mow_c_p0/test_schema_change_and_compaction.out +++ b/regression-test/data/unique_with_mow_c_p0/test_schema_change_and_compaction.out @@ -1,7 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !select1 -- -10 20 35 40 +10 20 30 40 -- !select2 -- -10 20 40 35 +10 20 37 40 +11 20 37 40 diff --git a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_and_compaction.groovy b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_and_compaction.groovy index 5a1ca183e75cf29..1034a61f628f3dc 100644 --- a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_and_compaction.groovy +++ b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_and_compaction.groovy @@ -23,12 +23,15 @@ import org.codehaus.groovy.runtime.IOGroovyMethods suite("test_schema_change_and_compaction", "nonConcurrent") { def tableName = "test_schema_change_and_compaction" + def getAlterTableState = { job_state -> def retry = 0 + def last_state = "" while (true) { sleep(2000) def state = sql " show alter table column where tablename = '${tableName}' order by CreateTime desc limit 1" logger.info("alter table state: ${state}") + last_state = state[0][9] if (state.size() > 0 && state[0][9] == job_state) { return } @@ -95,7 +98,9 @@ suite("test_schema_change_and_compaction", "nonConcurrent") { sql """ insert into ${tableName} values(10, 20, 33, 40); """ sql """ insert into ${tableName} values(10, 20, 34, 40); """ sql """ insert into ${tableName} values(10, 20, 35, 40); """ - order_qt_select1 """ select * from ${tableName}; """ + // in local mode, the txn is committed, not visible, retry publish until the schema change is finished: 10, 20, 30, 40 + // in cloud mode, the + // order_qt_select1 """ select * from ${tableName}; """ // trigger compaction def backendId_to_backendIP = [:] @@ -135,6 +140,8 @@ suite("test_schema_change_and_compaction", "nonConcurrent") { // unblock unblock() + sql """ insert into ${tableName} values(10, 20, 36, 40), (11, 20, 36, 40); """ + sql """ insert into ${tableName} values(10, 20, 37, 40), (11, 20, 37, 40); """ getAlterTableState("FINISHED") order_qt_select2 """ select * from ${tableName}; """ }