[jira] [Commented] (SLING-7407) A thread pool with min size 1 uses only 1 thread for processing
[ https://issues.apache.org/jira/browse/SLING-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16332596#comment-16332596 ] Stefan Egli commented on SLING-7407: note that unfortunately the commit was done with my wrong user (@adobe.com instead of @apache.org) - but I hope this is fine > 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.12 > > > 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)
[jira] [Commented] (SLING-7407) A thread pool with min size 1 uses only 1 thread for processing
[ https://issues.apache.org/jira/browse/SLING-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16332464#comment-16332464 ] Stefan Egli commented on SLING-7407: good point, [lowered to info|https://github.com/apache/sling-org-apache-sling-commons-threads/commit/ea49cff1ce0d2f3e00fbf16d3b0d35e1b39a6a12], perhaps useful to have at info for visibility as we're changing a user's config. > 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.12 > > > 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)
[jira] [Commented] (SLING-7407) A thread pool with min size 1 uses only 1 thread for processing
[ https://issues.apache.org/jira/browse/SLING-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16332432#comment-16332432 ] Carsten Ziegeler commented on SLING-7407: - [~egli] Lgtm, thanks - not sure if we should log with level warn, info or debug might be ok as well. > 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.12 > > > 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)
[jira] [Commented] (SLING-7407) A thread pool with min size 1 uses only 1 thread for processing
[ https://issues.apache.org/jira/browse/SLING-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16332409#comment-16332409 ] Stefan Egli commented on SLING-7407: * committed change in https://github.com/apache/sling-org-apache-sling-commons-threads/commit/7fb9afbdd13b05947bf8b302e94ef9ba533dc6d7 * [~chetanm] or [~cziegeler] could you please have a quick review of the above change before I release, thx! > 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.12 > > > 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)