From 972df19b24f17fd74a4341cd621c2f2573cc8de6 Mon Sep 17 00:00:00 2001 From: zhengyu Date: Tue, 28 May 2024 15:56:17 +0800 Subject: [PATCH] [fix](statistics) correct update rows when doing multi-table load (#35474) rows of only one table is updated correctly, need to merge all table commit infos. ## Proposed changes Issue Number: close #xxx ## Further comments If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... --- .../apache/doris/transaction/PublishVersionDaemon.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 f7a9483c87637d..cb9084241717d1 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 @@ -305,7 +305,14 @@ private List generatePartitionVersionInfos(Collection generatePartitionVersionInfos(TableCommitInfo tableCommitInfo, TransactionState transactionState, Map> beIdToBaseTabletIds) { try { - beIdToBaseTabletIds.putAll(getBaseTabletIdsForEachBe(transactionState, tableCommitInfo)); + Map> map = getBaseTabletIdsForEachBe(transactionState, tableCommitInfo); + map.forEach((beId, newSet) -> { + beIdToBaseTabletIds.computeIfPresent(beId, (id, orgSet) -> { + orgSet.addAll(newSet); + return orgSet; + }); + beIdToBaseTabletIds.putIfAbsent(beId, newSet); + }); } catch (MetaNotFoundException e) { LOG.warn("exception occur when trying to get rollup tablets info", e); }