[test](case)add some debug log in mv case (#25458)

* [test](case)change the insert stmt in mv case
This commit is contained in:
zhangstar333
2023-10-17 11:04:45 +08:00
committed by GitHub
parent 5f844486e3
commit 384fddb2ff
4 changed files with 70 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import org.apache.doris.catalog.Env;
import org.apache.doris.catalog.KeysType;
import org.apache.doris.catalog.MaterializedIndex;
import org.apache.doris.catalog.MaterializedIndex.IndexState;
import org.apache.doris.catalog.MaterializedIndexMeta;
import org.apache.doris.catalog.OlapTable;
import org.apache.doris.catalog.OlapTable.OlapTableState;
import org.apache.doris.catalog.Partition;
@ -51,6 +52,7 @@ import org.apache.doris.common.io.Text;
import org.apache.doris.common.util.DbUtil;
import org.apache.doris.common.util.SqlParserUtils;
import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.common.util.Util;
import org.apache.doris.persist.gson.GsonPostProcessable;
import org.apache.doris.persist.gson.GsonUtils;
import org.apache.doris.qe.ConnectContext;
@ -73,6 +75,7 @@ import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.annotations.SerializedName;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -362,6 +365,23 @@ public class RollupJobV2 extends AlterJobV2 implements GsonPostProcessable {
Preconditions.checkState(rollupIndex.getState() == IndexState.SHADOW, rollupIndex.getState());
partition.createRollupIndex(rollupIndex);
}
StringBuilder debugString = new StringBuilder();
if (this.partitionIdToRollupIndex.isEmpty() == false) {
for (MaterializedIndex rollupIdx : partitionIdToRollupIndex.values()) {
debugString.append(rollupIdx.toString() + "\n");
}
}
Set<String> indexNames = Sets.newTreeSet(tbl.getIndexNameToId().keySet());
for (String indexName : indexNames) {
long indexId = tbl.getIndexNameToId().get(indexName);
MaterializedIndexMeta indexMeta = tbl.getIndexIdToMeta().get(indexId);
debugString.append(indexName);
debugString.append(Util.getSchemaSignatureString(indexMeta.getSchema()));
debugString.append(indexMeta.getShortKeyColumnCount());
debugString.append(indexMeta.getStorageType());
}
//now add some log for P0 test case, this debugString info could remove after.
LOG.info("addRollupIndexToCatalog partition end: {}, table:{} ", debugString.toString(), tbl.toString());
tbl.setIndexMeta(rollupIndexId, rollupIndexName, rollupSchema, 0 /* init schema version */,
rollupSchemaHash, rollupShortKeyColumnCount, TStorageType.COLUMN,
@ -473,6 +493,7 @@ public class RollupJobV2 extends AlterJobV2 implements GsonPostProcessable {
List<Replica> rollupReplicas = rollupTablet.getReplicas();
for (Replica rollupReplica : rollupReplicas) {
AlterReplicaTask rollupTask = new AlterReplicaTask(rollupReplica.getBackendId(), dbId, tableId,
partitionId, rollupIndexId, baseIndexId, rollupTabletId, baseTabletId,

View File

@ -420,7 +420,7 @@ public class OlapTable extends Table {
// 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) {