somandal commented on code in PR #12297: URL: https://github.com/apache/pinot/pull/12297#discussion_r1463553215
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java: ########## @@ -223,8 +224,21 @@ 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()); Review Comment: what's the upper bound of total `segmentDataManagers` and is it save to spawn so many threads? Just wondering a smaller limit should be used here -- 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