@@ -127,7 +127,7 @@ default boolean checkCRDAndValidateLocalModel() {
127
127
return false ;
128
128
}
129
129
130
- int DEFAULT_RECONCILIATION_THREADS_NUMBER = 200 ;
130
+ int DEFAULT_RECONCILIATION_THREADS_NUMBER = Integer . MAX_VALUE ;
131
131
int MIN_DEFAULT_RECONCILIATION_THREADS_NUMBER = 10 ;
132
132
133
133
/**
@@ -190,6 +190,22 @@ default Metrics getMetrics() {
190
190
return Metrics .NOOP ;
191
191
}
192
192
193
+ /**
194
+ * Use to provide custom executor service. By default, a
195
+ * {@link java.util.concurrent.ThreadPoolExecutor} is provided, that honors the values of
196
+ * concurrentReconciliationThreads and minConcurrentReconciliationThreads. When a controller
197
+ * starts, all the resources are reconciled, therefore there is a natural and expected burst on
198
+ * startup in general. According to this there are multiple options, using the ThreadPoolExecutor.
199
+ * Either:
200
+ * <ul>
201
+ * <li>Use a very high upper bound thread limit with
202
+ * {@link java.util.concurrent.SynchronousQueue}. This is the default approach.</li>
203
+ * <li>Use fixed number of threads with infinite queue, lik
204
+ * {@link java.util.concurrent.LinkedBlockingDeque}.</li>
205
+ * <li>In addition to that, could be further fine tuned using the
206
+ * {@link java.util.concurrent.ArrayBlockingQueue}.</li>
207
+ * </ul>
208
+ */
193
209
default ExecutorService getExecutorService () {
194
210
return newThreadPoolExecutor (minConcurrentReconciliationThreads (),
195
211
concurrentReconciliationThreads ());
0 commit comments