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


##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/BrokerResourceValidationManager.java:
##########
@@ -45,6 +48,17 @@ public BrokerResourceValidationManager(ControllerConf 
config, PinotHelixResource
         controllerMetrics);
   }
 
+  @Override
+  protected List<String> getTablesToProcess(Properties periodicTaskProperties) 
{
+    List<String> tables = super.getTablesToProcess(periodicTaskProperties);
+    if (periodicTaskProperties.get(PeriodicTask.PROPERTY_KEY_TABLE_NAME) != 
null) {
+      return tables;
+    }
+    List<String> combined = new ArrayList<>(tables);
+    
combined.addAll(_pinotHelixResourceManager.getBrokerResourceLogicalTablePartitions());

Review Comment:
   The original comment sounded more like a suggestion than a info question.
   
   We override `getTablesToProcess()` to include the logical table. The 
`runTask()` method in the `ControllerPeriodicTask` filter the tables by 
checking leader controller before starting the task processing.
   
   ```
   protected boolean shouldProcessTable(String tableNameWithType) {
       return _leadControllerManager.isLeaderForTable(tableNameWithType);
     }
   ```
   
   This is part of the PR only.



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