Jackie-Jiang commented on code in PR #15726: URL: https://github.com/apache/pinot/pull/15726#discussion_r2080230117
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java: ########## @@ -2050,6 +2092,40 @@ public void setExistingTableConfig(TableConfig tableConfig) setExistingTableConfig(tableConfig, -1); } + /** + * Update the logical table config. + * @param logicalTableConfig The logical table config to be updated + * @throws TableNotFoundException If the logical table does not exist + */ + public void updateLogicalTableConfig(LogicalTableConfig logicalTableConfig) + throws TableNotFoundException { + String tableName = logicalTableConfig.getTableName(); + LOGGER.info("Updating logical table {}: Start", tableName); + + if (!ZKMetadataProvider.isLogicalTableExists(_propertyStore, tableName)) { + throw new TableNotFoundException("Logical table: " + tableName + " does not exist"); + } + + LOGGER.info("Updating logical table {}: Updating logical table config in the property store", tableName); + ZKMetadataProvider.setLogicalTableConfig(_propertyStore, logicalTableConfig); + + LOGGER.info("Updating logical table {}: Updating BrokerResource for table", tableName); + updateBrokerResourceForLogicalTable(logicalTableConfig, tableName); Review Comment: Consider comparing the new config with existing one, and only update broker resource when the broker tenant changed -- 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