From abb9c88a3febd95ef491663ca2705ff019789e9c Mon Sep 17 00:00:00 2001 From: James Date: Wed, 9 Jul 2025 09:57:24 +0800 Subject: [PATCH] branch-2.1: [improve](hive row count)Log stack info when fetch hive row count fail. (#52795) (#52849) backport: https://github.com/apache/doris/pull/52795 --- .../apache/doris/datasource/ExternalRowCountCache.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalRowCountCache.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalRowCountCache.java index 0826187317..4eb5424bcc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalRowCountCache.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalRowCountCache.java @@ -86,8 +86,13 @@ public class ExternalRowCountCache { TableIf table = StatisticsUtil.findTable(rowCountKey.catalogId, rowCountKey.dbId, rowCountKey.tableId); return Optional.of(table.fetchRowCount()); } catch (Exception e) { - LOG.warn("Failed to get table with catalogId {}, dbId {}, tableId {}", rowCountKey.catalogId, - rowCountKey.dbId, rowCountKey.tableId); + String message = String.format("Failed to get table with catalogId %s, dbId %s, tableId %s. Reason: %s", + rowCountKey.catalogId, rowCountKey.dbId, rowCountKey.tableId, e.getMessage()); + if (LOG.isDebugEnabled()) { + LOG.debug(message, e); + } else { + LOG.warn(message); + } return Optional.empty(); } }