Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6622

Configure default core pool size for thread pool used by oak-lucene

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.7, 1.8.0
    • lucene
    • None

    Description

      LuceneIndexProviderService currently configures a thread pool like below

       ThreadPoolExecutor executor = new ThreadPoolExecutor(
                0,  //corePoolSize
                5, //maxPoolSize
               60L, 
               TimeUnit.SECONDS,
               new LinkedBlockingQueue<Runnable>(), //Unbounded queue
               new ThreadFactory() {
      

      Per ThreadPoolExecutor

      If there are more than corePoolSize but less than maximumPoolSize threads running, a new thread will be created only if the queue is full

      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.

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: