Jackie-Jiang commented on code in PR #12297:
URL: https://github.com/apache/pinot/pull/12297#discussion_r1473524770


##########
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:
   +1. We shouldn't create unbounded thread pool. The default should be based 
on the CPU cores, and we can consider making it configurable



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