vrajat commented on code in PR #15720:
URL: https://github.com/apache/pinot/pull/15720#discussion_r2081405032


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -2124,22 +2135,25 @@ public void updateLogicalTableConfig(LogicalTableConfig 
logicalTableConfig)
       logicalTableConfig.setBrokerTenant("DefaultTenant");
     }
 
-    LogicalTableUtils.validateLogicalTableName(
+    LogicalTableConfigUtils.validateLogicalTableConfig(
         logicalTableConfig,
         
PinotHelixPropertyStoreZnRecordProvider.forTable(_propertyStore)::exist,
         getAllBrokerTenantNames()::contains,
         _propertyStore
     );
 
-    if (!ZKMetadataProvider.isLogicalTableExists(_propertyStore, tableName)) {
+    LogicalTableConfig oldLogicalTableConfig = 
ZKMetadataProvider.getLogicalTableConfig(_propertyStore, tableName);
+    if (oldLogicalTableConfig == null) {
       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);
+    if 
(oldLogicalTableConfig.getBrokerTenant().equals(logicalTableConfig.getBrokerTenant()))
 {

Review Comment:
   Is this one the opposite of what it should be ? `!equals` instead of 
`equals` ? If I am reading this right, the broker resource is updated if the 
tenants are equal. 



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