sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Munteanu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SLING-7407) A thread pool with min size 1 uses only 1 thread for processing
Date Thu, 25 Jan 2018 14:02:00 GMT

     [ https://issues.apache.org/jira/browse/SLING-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Munteanu updated SLING-7407:
-----------------------------------
    Fix Version/s:     (was: Commons Threads 3.2.12)
                   Commons Threads 3.2.14

> A thread pool with min size 1 uses only 1 thread for processing
> ---------------------------------------------------------------
>
>                 Key: SLING-7407
>                 URL: https://issues.apache.org/jira/browse/SLING-7407
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>            Reporter: Chetan Mehrotra
>            Assignee: Stefan Egli
>            Priority: Major
>             Fix For: Commons Threads 3.2.14
>
>
> If a thread pool is configured like below
> {noformat}
>  org.apache.sling.commons.threads.impl.DefaultThreadPool.factory-oak
>     name="oak"
>     minPoolSize=I"1"
>     maxPoolSize=I"5"
> {noformat}
> Then only 1 thread would be used even if multiple jobs are assigned to the pool. This
happens because of strange behaviour of Java [ThreadPoolExecutor|https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html]
> bq. If there are more than corePoolSize but less than maximumPoolSize threads running,
a new thread will be created only *if the queue is full*
> With unbounded queue used this lead to current behaviour. As a fix Sling Thread Pool
should adapt such a config 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message