klsince commented on code in PR #11020:
URL: https://github.com/apache/pinot/pull/11020#discussion_r1250228382


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BaseTableUpsertMetadataManager.java:
##########
@@ -75,6 +115,145 @@ public void init(TableConfig tableConfig, Schema schema, 
TableDataManager tableD
 
     _enableSnapshot = upsertConfig.isEnableSnapshot();
     _serverMetrics = serverMetrics;
+    _helixManager = helixManager;
+    _preloadExecutor = preloadExecutor;
+    try {
+      if (_enableSnapshot && upsertConfig.isEnablePreload()) {
+        preloadSegments();

Review Comment:
   PR updated. The explicit waiting logic with lock/condition was removed, 
replaced with the implicit waiting logic as ensured by 
ConcurrentHashMap.computeIfAbsent() in HelixInstanceDataManager. I left a 
comment about this implicit behavior.
   
   hey @KKcorps 
   > Also the table data manager is created when first message is received in 
the Helix queue iiuc.
   Yes. This is the existing implementation of HelixInstanceDataManager, e.g. 
   ```
   public void addRealtimeSegment(String realtimeTableName, String segmentName)
   ...
   _tableDataManagerMap.computeIfAbsent(realtimeTableName, k -> 
createTableDataManager(k, tableConfig))
   ...
   ```
   
   > We might need to change that as well.  
   Pardon me, I didn't get where to change. Could you help elaborate a bit more 
on this. Thank you.



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