Jackie-Jiang commented on a change in pull request #5015: Enhance 
TableRebalancer to support reassigning COMPLETED segments when instances changed
URL: https://github.com/apache/incubator-pinot/pull/5015#discussion_r371413772
 
 

 ##########
 File path: 
pinot-common/src/main/java/org/apache/pinot/common/config/instance/InstanceAssignmentConfigUtils.java
 ##########
 @@ -34,7 +34,21 @@ private InstanceAssignmentConfigUtils() {
   }
 
   /**
-   * Returns whether the instance assignment is allowed for the given table 
config.
+   * Returns whether the COMPLETED segments should be relocated (offloaded 
from CONSUMING instances to COMPLETED
+   * instances) for a LLC real-time table based on the given table config.
+   * <p>COMPLETED segments should be relocated iff the COMPLETED instance 
assignment is configured or (for
+   * backward-compatibility) COMPLETED server tag is overridden to be 
different from the CONSUMING server tag.
+   */
+  public static boolean shouldRelocateCompletedSegments(TableConfig 
tableConfig) {
+    Map<InstancePartitionsType, InstanceAssignmentConfig> 
instanceAssignmentConfigMap =
+        tableConfig.getInstanceAssignmentConfigMap();
+    return (instanceAssignmentConfigMap != null
 
 Review comment:
   Once we migrate to the new instance assignment model, we will have a 
instance partitions znode for every table. Right now it is for 
backward-compatibility to check this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to