somandal commented on code in PR #15266:
URL: https://github.com/apache/pinot/pull/15266#discussion_r2027904077


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java:
##########
@@ -402,9 +402,17 @@ private RebalanceResult doRebalance(TableConfig 
tableConfig, RebalanceConfig reb
       }
     }
 
+    List<String> segmentsToMove = 
SegmentAssignmentUtils.getSegmentsToMove(currentAssignment, targetAssignment);
+    Set<String> segmentsToMonitor = new HashSet<>(segmentsToMove);
+
+    long estimatedAverageSegmentSizeInBytes = 
summaryResult.getSegmentInfo().getEstimatedAverageSegmentSizeInBytes();
+    Set<String> allOriginalSegmentsIdealState = currentAssignment.keySet();

Review Comment:
   done
   this list was meant to be the list of segments prior to adding the latest 
newly added segments. once we process stats, then I add any new segments to 
this list so the next stats calculation ignores them. hope that makes sense



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalanceProgressStats.java:
##########
@@ -118,6 +128,116 @@ public RebalanceStateStats 
getCurrentToTargetConvergence() {
     return _currentToTargetConvergence;
   }
 
+  public RebalanceProgressStats getRebalanceProgressStatsOverall() {
+    return _rebalanceProgressStatsOverall;
+  }
+
+  public RebalanceProgressStats getRebalanceProgressStatsCurrentStep() {
+    return _rebalanceProgressStatsCurrentStep;
+  }
+
+  /**
+   * Updates the overall and step progress stats based on the latest 
calculated step's progress stats. This should
+   * be called during the EV-IS convergence trigger to ensure the overall 
stats reflect the changes as they are made.
+   * @param latestStepStats latest step level stats calculated in this 
iteration
+   */
+  public void updateOverallAndStepStatsFromLatestStepStats(
+      TableRebalanceProgressStats.RebalanceProgressStats latestStepStats) {
+    TableRebalanceProgressStats.RebalanceProgressStats lastStepStats = 
getRebalanceProgressStatsCurrentStep();
+    TableRebalanceProgressStats.RebalanceProgressStats lastOverallStats = 
getRebalanceProgressStatsOverall();
+    int numAdditionalSegmentsAdded =
+        latestStepStats._totalSegmentsToBeAdded - 
lastStepStats._totalSegmentsToBeAdded;
+    int numAdditionalSegmentsDeleted =
+        latestStepStats._totalSegmentsToBeDeleted - 
lastStepStats._totalSegmentsToBeDeleted;
+    int upperBoundOnSegmentsAdded =

Review Comment:
   added comments, please take a look when you get a chance



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to