saurabhd336 commented on code in PR #10255:
URL: https://github.com/apache/pinot/pull/10255#discussion_r1119895149


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1757,6 +1758,23 @@ private void assignInstances(TableConfig tableConfig, 
boolean override) {
         }
       }
     }
+
+    // Process and persist tier config instancePartitions
+    if (CollectionUtils.isNotEmpty(tableConfig.getTierConfigsList())
+        && tableConfig.getInstanceAssignmentConfigMap() != null) {
+      for (TierConfig tierConfig : tableConfig.getTierConfigsList()) {
+        if 
(tableConfig.getInstanceAssignmentConfigMap().containsKey(tierConfig.getName()))
 {
+          if (override || 
InstancePartitionsUtils.fetchInstancePartitions(_propertyStore,
+              
InstancePartitionsUtils.getInstancePartitonNameForTier(tableNameWithType, 
tierConfig.getName()))
+              == null) {
+            InstancePartitions instancePartitions =
+                instanceAssignmentDriver.assignInstances(tierConfig.getName(), 
instanceConfigs, null,
+                    
tableConfig.getInstanceAssignmentConfigMap().get(tierConfig.getName()));
+            InstancePartitionsUtils.persistInstancePartitions(_propertyStore, 
instancePartitions);

Review Comment:
   Ack



-- 
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