Skip to content

Commit 032f39c

Browse files
committed
docs
Signed-off-by: Attila Mészáros <csviri@gmail.com>
1 parent cb38058 commit 032f39c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ default boolean checkCRDAndValidateLocalModel() {
127127
return false;
128128
}
129129

130-
int DEFAULT_RECONCILIATION_THREADS_NUMBER = 200;
130+
int DEFAULT_RECONCILIATION_THREADS_NUMBER = Integer.MAX_VALUE;
131131
int MIN_DEFAULT_RECONCILIATION_THREADS_NUMBER = 10;
132132

133133
/**
@@ -190,6 +190,22 @@ default Metrics getMetrics() {
190190
return Metrics.NOOP;
191191
}
192192

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+
*/
193209
default ExecutorService getExecutorService() {
194210
return newThreadPoolExecutor(minConcurrentReconciliationThreads(),
195211
concurrentReconciliationThreads());

0 commit comments

Comments
 (0)