mcvsubbu commented on a change in pull request #8103:
URL: https://github.com/apache/pinot/pull/8103#discussion_r797046594



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -1270,6 +1270,11 @@ public void addTable(TableConfig tableConfig)
         if (getAllTables().contains(tableNameWithType)) {
           throw new TableAlreadyExistsException("Table " + tableNameWithType + 
" already exists");
         }
+        List<SegmentZKMetadata> segmentsZKMetadata = 
getSegmentsZKMetadata(tableNameWithType);
+        if (segmentsZKMetadata != null && segmentsZKMetadata.size() != 0) {
+          throw new TableAlreadyExistsException("Table " + tableNameWithType + 
" still have active segments registered"

Review comment:
       Table already exists may not be the right one, depending on whether the 
table is under deletion now? Is it guaranteed that the delete call removes all 
metadata right away?




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