BartMiki commented on PR #15754: URL: https://github.com/apache/druid/pull/15754#issuecomment-1910076403
@abhishekagarwal87 Yes, that is also a great idea just to have a single executor that is shared. The question is, how much threads should it have? There is for example: `LoadedSegmentDataProviderFactory` that also have `query-cancellation-executor` (but different one): ```java private static final int DEFAULT_THREAD_COUNT = 4; ... this.queryCancellationExecutor = ScheduledExecutors.fixed(DEFAULT_THREAD_COUNT, "query-cancellation-executor"); ``` So my ideas are: 1. extend `DirectDruidClientFactory` with predefined `this.queryCancellationExecutor` with fix number of threads (e.g. 4 like there) or inject it from outside (as `DirectDruidClientFactory` has inject annotation) and pass it to the `DirectDruidClient` as argument 2. Extract this `queryCancellationExecutor` from both places, create it in a single place (with Druid configuration for number of threads) and inject it in both Factories I guess the idea 1. is easier and adheres to the pattern that was already present with `LoadedSegmentDataProviderFactory`. -- 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]
