sanpwc commented on code in PR #6224:
URL: https://github.com/apache/ignite-3/pull/6224#discussion_r2195536424


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java:
##########
@@ -1127,6 +1128,10 @@ private void 
handleLocalPartitionStatesRequest(LocalPartitionStatesRequest reque
                 .state(localPartitionStateWithLogIndex.state)
                 .logIndex(localPartitionStateWithLogIndex.logIndex)
                 .estimatedRows(calculateEstimatedSize(zonePartitionId))

Review Comment:
   Seems that we retrieve esitmated size for all tables twice, once 
withinlocalPartitionStateWithLogIndex() and one more time within newly 
introduced estimatedSizeMap. Is that because of compatibility? 



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java:
##########
@@ -823,25 +825,24 @@ private Map<TablePartitionId, 
LocalPartitionStateMessageByNode> zoneStateToTable
 
                     LocalPartitionStateMessage localPartitionStateMessage = 
nodeEntry.getValue();
 
-                    TableViewInternal tableViewInternal = 
tableManager.cachedTable(tablePartitionId.tableId());
-
-                    if (tableViewInternal == null) {
+                    Map<TablePartitionIdMessage, Long> estimatedRowsMap = 
localPartitionStateMessage.partitionIdToEstimatedRowsMap();

Review Comment:
   What about compatibility? Let's say that new node retrieves 
localPartitionStateMessage from the old node (I'm talking about rolling update 
scenario) where there's no such field `partitionIdToEstimatedRowsMap`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to