walterddr commented on code in PR #10461:
URL: https://github.com/apache/pinot/pull/10461#discussion_r1146892699


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java:
##########
@@ -478,20 +486,35 @@ public synchronized void buildRouting(String 
tableNameWithType) {
         Set<String> offlineTablePreSelectedOnlineSegments =
             
offlineTableSegmentPreSelector.preSelect(offlineTableOnlineSegments);
         TimeBoundaryManager offlineTableTimeBoundaryManager =
-            new TimeBoundaryManager(offlineTableConfig, _propertyStore, 
_brokerMetrics);
-        offlineTableTimeBoundaryManager.init(offlineTableIdealState, 
offlineTableExternalView,
-            offlineTablePreSelectedOnlineSegments);
-        
offlineTableRoutingEntry.setTimeBoundaryManager(offlineTableTimeBoundaryManager);
+            new TimeBoundaryManager(offlineTableConfig, schema, 
_brokerMetrics);
+        
offlineTableRoutingEntry.initTimeBoundaryManager(offlineTableTimeBoundaryManager,
 offlineTableIdealState,
+            offlineTableExternalView, offlineTablePreSelectedOnlineSegments);

Review Comment:
   This init is not protected by synchronize and thus I cannot move it to be 
init via SegmentZkMetadataCache...
   
   This potentially can cause out-of-sync between the cache and the 
TimeBoundaryManager
   
   In order for this to be called via SegmentZkMetadataCache, we can either:
   - make onAssignmentChange API call (which is synchronized);
   - make the init method also synchronized



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

Reply via email to