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

lijibing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 9920e9678f7 [improve](hive row count)Log stack info when fetch hive 
row count fail. (#52795)
9920e9678f7 is described below

commit 9920e9678f7d902921e1616ee39560cbcdcaf96f
Author: James <[email protected]>
AuthorDate: Mon Jul 7 10:02:32 2025 +0800

    [improve](hive row count)Log stack info when fetch hive row count fail. 
(#52795)
    
    ### What problem does this PR solve?
    Log stack info when fetch hive row count fail.
---
 .../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