siddharthteotia commented on code in PR #12297: URL: https://github.com/apache/pinot/pull/12297#discussion_r1462833181
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java: ########## @@ -223,8 +224,12 @@ protected void releaseAndRemoveAllSegments() { segmentDataManagers = new ArrayList<>(_segmentDataManagerMap.values()); _segmentDataManagerMap.clear(); } - for (SegmentDataManager segmentDataManager : segmentDataManagers) { - releaseSegment(segmentDataManager); + if (!segmentDataManagers.isEmpty()) { + ExecutorService stopExecutorService = Executors.newFixedThreadPool(segmentDataManagers.size()); + for (SegmentDataManager segmentDataManager : segmentDataManagers) { + stopExecutorService.submit(() -> releaseSegment(segmentDataManager)); + } + stopExecutorService.shutdown(); Review Comment: Don't we need to remove line 232 ? -- 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