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


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1448,7 +1449,14 @@ public void addTable(TableConfig tableConfig)
          * We also need to support the case when a high-level consumer already 
exists for a table and we are adding
          * the low-level consumers.
          */
-        ensureRealtimeClusterIsSetUp(tableConfig);
+        try {

Review Comment:
   Let's have a larger try-catch that covers both offline case and realtime 
case (having 2 separate try-catch is also fine. Essentially when the table 
creation didn't finish properly, we should clean up all the records already 
written to ZK



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1385,7 +1385,8 @@ public void addTable(TableConfig tableConfig)
       throws IOException {
     String tableNameWithType = tableConfig.getTableName();
     if (getTableConfig(tableNameWithType) != null) {
-      throw new TableAlreadyExistsException("Table " + tableNameWithType + " 
already exists");
+      throw new TableAlreadyExistsException("Table config for " + 
tableNameWithType
+          + " already exists. Try deleting the table to remove all metadata 
associated with it.");

Review Comment:
   ```suggestion
             + " already exists. If this is unexpected, try deleting the table 
to remove all metadata associated with it.");
   ```



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