abhishekbafna commented on code in PR #17842:
URL: https://github.com/apache/pinot/pull/17842#discussion_r2941918050


##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/BrokerResourceValidationManager.java:
##########
@@ -55,15 +69,21 @@ protected Context preprocess(Properties 
periodicTaskProperties) {
   @Override
   protected void processTable(String tableNameWithType, Context context) {
     TableConfig tableConfig = 
_pinotHelixResourceManager.getTableConfig(tableNameWithType);
-    if (tableConfig == null) {
-      LOGGER.warn("Failed to find table config for table: {}, skipping broker 
resource validation", tableNameWithType);
+    if (tableConfig != null) {
+      Set<String> brokerInstances = _pinotHelixResourceManager
+          .getAllInstancesForBrokerTenant(context._instanceConfigs, 
tableConfig.getTenantConfig().getBroker());
+      _pinotHelixResourceManager.rebuildBrokerResource(tableNameWithType, 
brokerInstances);
       return;
     }
-
-    // Rebuild broker resource
-    Set<String> brokerInstances = _pinotHelixResourceManager
-        .getAllInstancesForBrokerTenant(context._instanceConfigs, 
tableConfig.getTenantConfig().getBroker());
-    _pinotHelixResourceManager.rebuildBrokerResource(tableNameWithType, 
brokerInstances);
+    LogicalTableConfig logicalTableConfig = 
_pinotHelixResourceManager.getLogicalTableConfig(tableNameWithType);
+    if (logicalTableConfig != null) {
+      Set<String> brokerInstances = _pinotHelixResourceManager

Review Comment:
   Check this out: 
https://docs.google.com/document/d/1iS0wtG_V2-W9sQsKkziMjTljT5qKAH_hhsksXr1Tvys/edit?tab=t.0#bookmark=id.iek6q8y68huw
   
   In the broker resource we are keeping a mapping of table to broker instance, 
same for the physical tables. I believe, query engine uses the broker instance 
from the table name key in the broker resources.
   
   I can not pin point this in the code at the moment, let me know if that is 
required.



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