[fix](statistics) use replication_num as replica num (#25325)
This commit is contained in:
@ -1799,15 +1799,18 @@ public class DatabaseTransactionMgr {
|
||||
}
|
||||
AnalysisManager analysisManager = Env.getCurrentEnv().getAnalysisManager();
|
||||
Map<Long, Long> tableIdToTotalNumDeltaRows = transactionState.getTableIdToTotalNumDeltaRows();
|
||||
LOG.debug("table id to loaded rows:{}", tableIdToTotalNumDeltaRows);
|
||||
Map<Long, Long> tableIdToNumDeltaRows = Maps.newHashMap();
|
||||
tableIdToTotalNumDeltaRows
|
||||
.forEach((tableId, numRows) -> {
|
||||
OlapTable table = (OlapTable) db.getTableNullable(tableId);
|
||||
if (table != null) {
|
||||
tableIdToNumDeltaRows.put(tableId, numRows / table.getReplicaCount());
|
||||
short replicaNum = table.getTableProperty()
|
||||
.getReplicaAllocation()
|
||||
.getTotalReplicaNum();
|
||||
tableIdToNumDeltaRows.put(tableId, numRows / replicaNum);
|
||||
}
|
||||
});
|
||||
LOG.debug("table id to loaded rows:{}", tableIdToNumDeltaRows);
|
||||
tableIdToNumDeltaRows.forEach(analysisManager::updateUpdatedRows);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user