You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/09/06 10:24:00 UTC
[jira] [Created] (OAK-6622) Configure default core pool size for
thread pool used by oak-lucene
Chetan Mehrotra created OAK-6622:
------------------------------------
Summary: Configure default core pool size for thread pool used by oak-lucene
Key: OAK-6622
URL: https://issues.apache.org/jira/browse/OAK-6622
Project: Jackrabbit Oak
Issue Type: Improvement
Components: lucene
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Fix For: 1.8
{{LuceneIndexProviderService}} currently configures a thread pool like below
{code}
ThreadPoolExecutor executor = new ThreadPoolExecutor(
0, //corePoolSize
5, //maxPoolSize
60L,
TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>(), //Unbounded queue
new ThreadFactory() {
{code}
Per [ThreadPoolExecutor|https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html]
{quote}
If there are more than corePoolSize but less than maximumPoolSize threads running, a new thread will be created *only if the queue is full*
{quote}
Due to this currently the thread pool created by oak-lucene would only have 1 thread to handle all task as the queue is unbounded one. And if for some reason this thread gets stuck (due to some lock) then it would prevent other task in pool from further processing.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)