This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 5a68db78bed branch-3.1: [improve](hive row count)Log stack info when 
fetch hive row count fail. #52795 (#52840)
5a68db78bed is described below

commit 5a68db78bedfd137b93e95ad2687b48b87eb859f
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 8 11:42:40 2025 +0800

    branch-3.1: [improve](hive row count)Log stack info when fetch hive row 
count fail. #52795 (#52840)
    
    Cherry-picked from #52795
    
    Co-authored-by: James <[email protected]>
    Co-authored-by: Dongyang Li <[email protected]>
---
 .../org/apache/doris/datasource/ExternalRowCountCache.java     | 10 ++++++++--
 1 file changed, 8 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 4fc191b2f7f..352f733f8e7 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
@@ -87,9 +87,15 @@ 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 row count with catalogId {}, 
dbId {}, tableId {}. Reason {}",
+                String message = String.format("Failed to get table row count 
with catalogId %s, dbId %s, tableId %s. "
+                                + "Reason %s",
                         rowCountKey.catalogId, rowCountKey.dbId, 
rowCountKey.tableId, e.getMessage());
-                LOG.debug(e);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(message, e);
+                } else {
+                    LOG.warn(message);
+                }
+
                 // Return Optional.empty() will cache this empty value in 
memory,
                 // so we can't try to load the row count until the cache 
expire.
                 // Throw an exception here will cause too much stack log in 
fe.out.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to