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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to