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 ea785d5755c [improvement](log)Add log for load report update rows. (#38774) ea785d5755c is described below commit ea785d5755c41c7ebf7f9feef2b9e82e82618c63 Author: Jibing-Li <64681310+jibing...@users.noreply.github.com> AuthorDate: Fri Aug 2 22:27:33 2024 +0800 [improvement](log)Add log for load report update rows. (#38774) Add log for load report update rows. For debug purpose. --- be/src/olap/task/engine_publish_version_task.cpp | 2 ++ .../org/apache/doris/statistics/AnalysisManager.java | 18 ++++++++++++------ .../apache/doris/transaction/PublishVersionDaemon.java | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/be/src/olap/task/engine_publish_version_task.cpp b/be/src/olap/task/engine_publish_version_task.cpp index ae7b694b6df..45150881423 100644 --- a/be/src/olap/task/engine_publish_version_task.cpp +++ b/be/src/olap/task/engine_publish_version_task.cpp @@ -356,6 +356,8 @@ void EnginePublishVersionTask::_calculate_tbl_num_delta_rows( auto table_id = tablet->get_table_id(); if (kv.second > 0) { (*_table_id_to_tablet_id_to_num_delta_rows)[table_id][kv.first] += kv.second; + LOG(INFO) << "report delta rows to fe, table_id=" << table_id << ", tablet=" << kv.first + << ", num_rows=" << kv.second; } } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java index d269f386298..0ebbfd79811 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java +++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java @@ -1242,16 +1242,22 @@ public class AnalysisManager implements Writable { OlapTable olapTable = (OlapTable) table; short replicaNum = olapTable.getTableProperty().getReplicaAllocation().getTotalReplicaNum(); Map<Long, Long> tabletRows = record.getValue(); - if (tabletRows == null) { + if (tabletRows == null || tabletRows.isEmpty()) { + LOG.info("Tablet row count map is empty"); continue; } - long tableUpdateRows = 0; + long rowsForAllReplica = 0; for (Entry<Long, Long> entry : tabletRows.entrySet()) { - tableUpdateRows += entry.getValue(); + rowsForAllReplica += entry.getValue(); + if (LOG.isDebugEnabled()) { + LOG.debug("Table id {}, tablet id {}, row count {}", + record.getKey(), entry.getKey(), entry.getValue()); + } } - tableUpdateRows = tableUpdateRows / replicaNum; - LOG.info("Update rows for table {} is {}, replicaNum is {}", - olapTable.getName(), tableUpdateRows, replicaNum); + long tableUpdateRows = rowsForAllReplica / replicaNum; + LOG.info("Update rows for table {} is {}, replicaNum is {}, " + + "rows for all replica {}, tablets count {}", + olapTable.getName(), tableUpdateRows, replicaNum, rowsForAllReplica, tabletRows.size()); statsStatus.updatedRows.addAndGet(tableUpdateRows); if (StatisticsUtil.enablePartitionAnalyze()) { updatePartitionRows(olapTable, tabletRows, statsStatus, replicaNum); diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java index 3d852e8efbb..c021fd26bc3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java +++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java @@ -253,6 +253,8 @@ public class PublishVersionDaemon extends MasterDaemon { // Merge task tablets update rows to tableToTabletsDelta. private void calculateTaskUpdateRows(Map<Long, Map<Long, Long>> tableIdToTabletDeltaRows, PublishVersionTask task) { if (CollectionUtils.isEmpty(task.getErrorTablets())) { + LOG.info("Task backend id {}, update rows info : [{}]", + task.getBackendId(), task.getTableIdToTabletDeltaRows()); for (Entry<Long, Map<Long, Long>> tableEntry : task.getTableIdToTabletDeltaRows().entrySet()) { if (tableIdToTabletDeltaRows.containsKey(tableEntry.getKey())) { Map<Long, Long> tabletsDelta = tableIdToTabletDeltaRows.get(tableEntry.getKey()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org