Jackie-Jiang commented on code in PR #11183: URL: https://github.com/apache/pinot/pull/11183#discussion_r1281411894
########## 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: Oh, didn't notice that this is within the `computeIfPresent()`. So the race condition is not there, but it will block all the queries at the same time. In order to solve this, we still need to use lock so that queries can still acquire the old table data manager -- 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