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


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java:
##########
@@ -653,6 +656,44 @@ public synchronized void removeRouting(String 
tableNameWithType) {
     }
   }
 
+  public synchronized void removeRoutingForLogicalTable(String 
logicalTableName) {
+    LOGGER.info("Removing time boundary manager for logical table: {}", 
logicalTableName);
+    LogicalTableConfig logicalTableConfig =
+        ZKMetadataProvider.getLogicalTableConfig(_propertyStore, 
logicalTableName);
+    Preconditions.checkState(logicalTableConfig != null, "Failed to find 
logical table config for: %s",
+        logicalTableName);
+    if (!logicalTableConfig.isHybridLogicalTable()) {
+      LOGGER.info("Skip removing time boundary manager for non hybrid logical 
table: {}", logicalTableName);
+      return;
+    }
+    String strategy = 
logicalTableConfig.getTimeBoundaryConfig().getBoundaryStrategy();
+    TimeBoundaryStrategy timeBoundaryStrategy =
+        
TimeBoundaryStrategyService.getInstance().getTimeBoundaryStrategy(strategy);
+    List<String> timeBoundaryTableNames = 
timeBoundaryStrategy.getTimeBoundaryTableNames(logicalTableConfig);
+    for (String tableNameWithType : timeBoundaryTableNames) {
+
+      if (TableNameBuilder.isRealtimeTableResource(tableNameWithType)) {

Review Comment:
   It can be true given we do not have validation for it at the moment. Even in 
the build routing we have added a check that time boundary table names should 
be offline tables. Similarly, this check is to skip them.
   
   In case of th build we choose to raise exception but in the clean up it 
should continue and do the cleanup for the rest.



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