siddharthteotia commented on code in PR #8989:
URL: https://github.com/apache/pinot/pull/8989#discussion_r919571244


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1688,13 +1690,22 @@ private void assignInstances(TableConfig tableConfig, 
boolean override) {
       }
     }
 
+    boolean isTableInGroup = TableConfigUtils.isTableInGroup(tableConfig);

Review Comment:
   What are the scenarios that we support ?
   
   **Adding a new table to TableGroup that pre-exists with 1 or more tables.** 
   
   In such scenario, the replica group based InstancePartitions for the group 
should pre-exist and when `addTable` calls comes in `PinotHelixResourceManager` 
and internally calls `assignInstances`, no new instance assignment should 
happen and the group's existing `InstancePartitions` should be retrieved and 
persisted in ZK for the new table
   
   **Creating a new TableGroup with new tables.** 
   
   - When the group is created, we don't do instance assignment and just do 
metadata change w.r.t that group exists without any tables and no instances. 
   - When the first new table is created and added to the group, the `addTable 
-> assignInstances` call should recognize that this table is part of a group 
for which instance assignment is yet to happen. So we call the driver to assign 
instances for the group.
   - When the 2nd, 3rd ... table is created and added to the group, the 
`addTable -> assignInstances` call should recognize that this table is part of 
a group for which instance assignment is already done.
   
   The other way to do is that when TableGroup is created, it triggers 
InstanceAssignment by calling the driver. So when 1st, 2nd, 3rd table is added, 
it finds it is member of an existing group with existing assignment so it is 
pretty much NO-OP
   
   It seems like code at line 1701 is assuming that InstancePartitions for a 
TableGroup should exist. But I don't see instance assignment being done during 
creation of TableGroup. So how do we handle the case of 1st table ?



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