Jackie-Jiang commented on code in PR #14630:
URL: https://github.com/apache/pinot/pull/14630#discussion_r1880800731


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -3837,6 +3838,24 @@ public void endReplaceSegments(String tableNameWithType, 
String segmentLineageEn
         tableNameWithType, segmentLineageEntryId);
   }
 
+  /**
+   * Internal method to initiate pageCache warmup for a table before the new 
refresh segments are available
+   * for querying.
+   * This method triggers a pageCache warmup operation on the server for the 
specified table and segments.
+   * For refresh tables, the `segmentsTo` list is particularly important as it 
contains the segments
+   * that need to be warmed up.
+   * Example:
+   * To warm up specific segments of the "salesData_OFFLINE" table:
+   *   - tableNameWithType: "salesData_OFFLINE"
+   *   - segmentsTo: ["segment1", "segment2", "segment3"]
+   *
+   * @param tableNameWithType The name and type of the table for which the 
pageCache warmup is triggered
+   * @param segmentsTo A list of segments that need to be warmed up before 
query availability
+   */
+  protected void preSegmentReplaceOperation(String tableNameWithType, 
List<String> segmentsTo) {

Review Comment:
   Suggest renaming it to `preSegmentReplaceUpdateRouting()` to be more 
precise, and include `segmentsFrom` in case user wants to do certain things on 
segments to be replaced.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -3837,6 +3838,24 @@ public void endReplaceSegments(String tableNameWithType, 
String segmentLineageEn
         tableNameWithType, segmentLineageEntryId);
   }
 
+  /**
+   * Internal method to initiate pageCache warmup for a table before the new 
refresh segments are available

Review Comment:
   Update the javadoc to something like:
   This method can be overridden to perform operations before updating the 
routing table to switch routing from `segmentsFrom` to `segmentsTo`. One 
example usage would be ...



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to