adarshsanjeev commented on code in PR #17775:
URL: https://github.com/apache/druid/pull/17775#discussion_r2007141302
##########
server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java:
##########
@@ -100,13 +119,20 @@ public SegmentLoadDropHandler(
SegmentLoaderConfig config,
DataSegmentAnnouncer announcer,
SegmentManager segmentManager,
- ScheduledExecutorService exec
+ ThreadPoolExecutor standardExec,
+ ThreadPoolExecutor turboExec,
+ ScheduledExecutorService scheduledExecutorService
)
{
this.config = config;
this.announcer = announcer;
this.segmentManager = segmentManager;
- this.exec = exec;
+ this.standardExec = standardExec;
+ this.turboExec = turboExec;
+ this.scheduledExecutorService = scheduledExecutorService;
+
+ this.standardExec.allowCoreThreadTimeOut(true);
+ this.turboExec.allowCoreThreadTimeOut(true);
Review Comment:
I think this conflicts with the other comment to use a
`ScheduledThreadPoolExecutor` instead of the standardExec, as scheduled
executors do not respect any `maximumPoolSize`, based on their javadoc. We
would need at least two pools due to this (a scheduled normal pool and turbo
pool).
> We would submit more requests only when a server is in turbo mode.
I also did not understand this, if we have `maxSize = max(numLoadingThreads,
numBootstrapThreads)` and we are currently in normal mode, if an new request
comes, would we not add a task for it? Or do you mean that the coordinator
would only send the correct number of requests so it doesn't matter?
--
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]