wirybeaver commented on code in PR #17235:
URL: https://github.com/apache/pinot/pull/17235#discussion_r2666379437


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1789,10 +1807,16 @@ public void addTable(TableConfig tableConfig)
         // Add ideal state
         _helixAdmin.addResource(_helixClusterName, tableNameWithType, 
idealState);
         LOGGER.info("Adding table {}: Added ideal state for offline table", 
tableNameWithType);
-      } else {
+      } else if (consumeMeta == null || consumeMeta.isEmpty()) {
         // Add ideal state with the first CONSUMING segment
         _pinotLLCRealtimeSegmentManager.setUpNewTable(tableConfig, idealState);
         LOGGER.info("Adding table {}: Added ideal state with first consuming 
segment", tableNameWithType);
+      } else {
+        // Add ideal state with the first CONSUMING segment with designated 
partition consuming metadata
+        // Add ideal state with the first CONSUMING segment
+        _pinotLLCRealtimeSegmentManager.setUpNewTable(tableConfig, idealState, 
consumeMeta);
+        LOGGER.info("Adding table {}: Added consuming segments ideal state 
given the designated consuming metadata",

Review Comment:
   This routine can be shared for other potential purposes. for example, a use 
can create a table with kafka offset they wanted to ingestion from



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