Aravind-Suresh commented on code in PR #11183:
URL: https://github.com/apache/pinot/pull/11183#discussion_r1300760260


##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java:
##########
@@ -242,6 +242,30 @@ public void addRealtimeSegment(String realtimeTableName, 
String segmentName)
     LOGGER.info("Added segment: {} to table: {}", segmentName, 
realtimeTableName);
   }
 
+  private void snapshotAndAddSegments(TableDataManager tableDataManager, 
String realtimeTableName)
+      throws Exception {
+    // we need to do an atomic snapshot here and then add segments because

Review Comment:
   The `getTableDataManager` method uses `get` which doesn't lock the 
underlying hash-node. The add/delete/reload methods do a compute* on the 
hashmap which would invoke lock. So this locking wouldn't happen - the only 
case that remains is what you called out below about existing queries in the 
old table data manager. So I'll add a delayed shutdown there.
   
   Let me know if I'm missing something.



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