From af470dc65b14e8a433a2e69743c44143a0ade81b Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Mon, 6 Jan 2025 17:04:37 +0800 Subject: [PATCH] [Refactor] refactor some log (#54479) Signed-off-by: sevev Signed-off-by: maggie-zhu --- be/src/storage/tablet_updates.cpp | 2 +- .../java/com/starrocks/alter/SchemaChangeHandler.java | 8 ++++++-- .../src/main/java/com/starrocks/catalog/OlapTable.java | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/be/src/storage/tablet_updates.cpp b/be/src/storage/tablet_updates.cpp index 621636ae96d9d..b98e86c420bda 100644 --- a/be/src/storage/tablet_updates.cpp +++ b/be/src/storage/tablet_updates.cpp @@ -1796,7 +1796,7 @@ Status TabletUpdates::_apply_normal_rowset_commit(const EditVersionInfo& version std::string msg_part3 = strings::Substitute("duration:$0ms($1/$2/$3/$4)", t_write - t_start, t_apply - t_start, t_index - t_apply, t_delvec - t_index, t_write - t_delvec); - bool is_slow = t_apply - t_start > config::apply_version_slow_log_sec * 1000; + bool is_slow = t_write - t_start > config::apply_version_slow_log_sec * 1000; if (is_slow) { LOG(INFO) << msg_part1 << msg_part2 << msg_part3; } else { diff --git a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java index c254cbccc748b..78205b5488002 100644 --- a/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java +++ b/fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java @@ -1898,7 +1898,9 @@ public int getAsInt() { fastSchemaEvolution &= processModifyColumn(modifyColumnClause, olapTable, indexSchemaMap); } else if (alterClause instanceof AddFieldClause) { if (RunMode.isSharedDataMode() && !Config.enable_alter_struct_column) { - throw new DdlException("Add field for struct column not support shared-data mode so far"); + throw new DdlException("Add field for struct column is disable in shared-data mode, " + + "please check `enable_alter_struct_column` in FE configure and `lake_enable_alter_struct` " + + "in all BE/CN configure"); } if (!fastSchemaEvolution) { throw new DdlException("Add field for struct column require table enable fast schema evolution"); @@ -1910,7 +1912,9 @@ public int getAsInt() { processAddField((AddFieldClause) alterClause, olapTable, indexSchemaMap, id, newIndexes); } else if (alterClause instanceof DropFieldClause) { if (RunMode.isSharedDataMode() && !Config.enable_alter_struct_column) { - throw new DdlException("Drop field for struct column not support shared-data mode so far"); + throw new DdlException("Drop field for struct column is disable in shared-data mode, " + + "please check `enable_alter_struct_column` in FE configure and `lake_enable_alter_struct` " + + "in all BE/CN configure"); } if (!fastSchemaEvolution) { throw new DdlException("Drop field for struct column require table enable fast schema evolution"); diff --git a/fe/fe-core/src/main/java/com/starrocks/catalog/OlapTable.java b/fe/fe-core/src/main/java/com/starrocks/catalog/OlapTable.java index dd12ed246bcff..e663de3f733ea 100644 --- a/fe/fe-core/src/main/java/com/starrocks/catalog/OlapTable.java +++ b/fe/fe-core/src/main/java/com/starrocks/catalog/OlapTable.java @@ -732,8 +732,8 @@ public void rebuildFullSchema() { maxColUniqueId = Math.max(maxColUniqueId, column.getMaxUniqueId()); } setMaxColUniqueId(maxColUniqueId); - LOG.info("after rebuild full schema. table {}, schema: {}, max column unique id: {}", - name, fullSchema, maxColUniqueId); + LOG.debug("after rebuild full schema. table {}, schema: {}, max column unique id: {}", + name, fullSchema, maxColUniqueId); } public boolean deleteIndexInfo(String indexName) {