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
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user