jtao15 commented on a change in pull request #8422: URL: https://github.com/apache/pinot/pull/8422#discussion_r839056123
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java ########## @@ -2053,6 +2062,35 @@ public boolean updateZkMetadata(String tableNameWithType, SegmentZKMetadata segm return ZKMetadataProvider.setSegmentZKMetadata(_propertyStore, tableNameWithType, segmentZKMetadata); } + /** + * Delete the table on servers by sending table deletion message + */ + private void deleteTableOnServer(String tableNameWithType) { + LOGGER.info("Sending delete table message for table: {}", tableNameWithType); + Criteria recipientCriteria = new Criteria(); + recipientCriteria.setRecipientInstanceType(InstanceType.PARTICIPANT); + recipientCriteria.setInstanceName("%"); + recipientCriteria.setResource(tableNameWithType); + recipientCriteria.setSessionSpecific(true); + TableDeletionMessage tableDeletionMessage = new TableDeletionMessage(tableNameWithType); + ClusterMessagingService messagingService = _helixZkManager.getMessagingService(); + + // Externalview can be null for newly created table, skip sending the message + if (_helixZkManager.getHelixDataAccessor() + .getProperty(_helixZkManager.getHelixDataAccessor().keyBuilder().externalView(tableNameWithType)) == null) { + LOGGER.warn("No delete table message sent for newly created table: {}", tableNameWithType); Review comment: Updated -- 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