diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java index 8d4af3648bbd69d..7e5527d8092c4b0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java +++ b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java @@ -340,7 +340,7 @@ protected void runPendingJob() throws AlterCancelException { tbl.writeLockOrAlterCancelException(); try { Preconditions.checkState(tbl.getState() == OlapTableState.ROLLUP); - addRollupIndexToCatalog(tbl); + addRollupIndexToCatalog(tbl, false); } finally { tbl.writeUnlock(); } @@ -354,7 +354,7 @@ protected void runPendingJob() throws AlterCancelException { LOG.info("transfer rollup job {} state to {}, watershed txn id: {}", jobId, this.jobState, watershedTxnId); } - private void addRollupIndexToCatalog(OlapTable tbl) { + private void addRollupIndexToCatalog(OlapTable tbl, boolean replay) { for (Partition partition : tbl.getPartitions()) { long partitionId = partition.getId(); MaterializedIndex rollupIndex = this.partitionIdToRollupIndex.get(partitionId); @@ -362,7 +362,14 @@ private void addRollupIndexToCatalog(OlapTable tbl) { Preconditions.checkState(rollupIndex.getState() == IndexState.SHADOW, rollupIndex.getState()); partition.createRollupIndex(rollupIndex); } - + String debugString = ""; + if (this.partitionIdToRollupIndex.isEmpty() == false) { + for (MaterializedIndex rollupIdx : partitionIdToRollupIndex.values()) { + debugString = debugString + rollupIdx.toString() + "\n"; + } + } + //now add some log for P0 test case, this debugString info could remove after. + LOG.info("addRollupIndexToCatalog partition end: {} ", debugString); tbl.setIndexMeta(rollupIndexId, rollupIndexName, rollupSchema, 0 /* init schema version */, rollupSchemaHash, rollupShortKeyColumnCount, TStorageType.COLUMN, rollupKeysType, origStmt, analyzer != null ? new Analyzer(analyzer) : analyzer, null); @@ -473,6 +480,7 @@ protected void runWaitingTxnJob() throws AlterCancelException { List rollupReplicas = rollupTablet.getReplicas(); + for (Replica rollupReplica : rollupReplicas) { AlterReplicaTask rollupTask = new AlterReplicaTask(rollupReplica.getBackendId(), dbId, tableId, partitionId, rollupIndexId, baseIndexId, rollupTabletId, baseTabletId, @@ -727,7 +735,7 @@ private void replayPendingJob(RollupJobV2 replayedJob) throws MetaNotFoundExcept OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableId, Table.TableType.OLAP); olapTable.writeLock(); try { - addRollupIndexToCatalog(olapTable); + addRollupIndexToCatalog(olapTable, true); } finally { olapTable.writeUnlock(); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java index 598392d3918f797..f64fd498d90c27d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java @@ -420,7 +420,7 @@ public void rebuildFullSchema() { // Column maybe renamed, rebuild the column name map indexMeta.initColumnNameMap(); } - LOG.debug("after rebuild full schema. table {}, schema size: {}", id, fullSchema.size()); + LOG.info("after rebuild full schema. table {}, schema size: {}", id, fullSchema.size()); } public boolean deleteIndexInfo(String indexName) { diff --git a/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy b/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy index fcf71498690cfc4..cdeb65e9ec5939f 100644 --- a/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy +++ b/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy @@ -151,22 +151,4 @@ suite("test_inlineview_with_window_function") { group by ordernum )tmp1 on tmp.ordernum=tmp1.ordernum;""" - - sql """drop table if exists test_table_aaa2;""" - sql """CREATE TABLE `test_table_aaa2` ( - `ordernum` varchar(65533) NOT NULL , - `dnt` datetime NOT NULL , - `data` json NULL - ) ENGINE=OLAP - DUPLICATE KEY(`ordernum`, `dnt`) - COMMENT 'OLAP' - DISTRIBUTED BY HASH(`ordernum`) BUCKETS 3 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - );""" - sql """insert into test_table_aaa2 select 'cib2205045_1_1s','2023/6/10 3:55:33','{"DB1":168939,"DNT":"2023-06-10 03:55:33"}' ;""" - sql """insert into test_table_aaa2 select 'cib2205045_1_1s','2023/6/10 3:56:33','{"DB1":168939,"DNT":"2023-06-10 03:56:33"}' ;""" - sql """insert into test_table_aaa2 select 'cib2205045_1_1s','2023/6/10 3:57:33','{"DB1":168939,"DNT":"2023-06-10 03:57:33"}' ;""" - sql """insert into test_table_aaa2 select 'cib2205045_1_1s','2023/6/10 3:58:33','{"DB1":168939,"DNT":"2023-06-10 03:58:33"}' ;""" - }