Skip to content

Commit

Permalink
[fix](statistics) correct update rows when doing multi-table load (ap…
Browse files Browse the repository at this point in the history
…ache#35474)

rows of only one table is updated correctly, need to merge all table
commit infos.

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

## Further comments

If this is a relatively large or complex change, kick off the discussion
at [[email protected]](mailto:[email protected]) by explaining why
you chose the solution you did and what alternatives you considered,
etc...
  • Loading branch information
freemandealer authored May 28, 2024
1 parent f7552f4 commit 972df19
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,14 @@ private List<TPartitionVersionInfo> generatePartitionVersionInfos(Collection<Tab
private List<TPartitionVersionInfo> generatePartitionVersionInfos(TableCommitInfo tableCommitInfo,
TransactionState transactionState, Map<Long, Set<Long>> beIdToBaseTabletIds) {
try {
beIdToBaseTabletIds.putAll(getBaseTabletIdsForEachBe(transactionState, tableCommitInfo));
Map<Long, Set<Long>> 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);
}
Expand Down

0 comments on commit 972df19

Please sign in to comment.