[
https://issues.apache.org/jira/browse/PHOENIX-8041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani reassigned PHOENIX-8041:
-------------------------------------
Assignee: Viraj Jasani
> Client thread pools stop working after ThreadGroup destruction
> --------------------------------------------------------------
>
> Key: PHOENIX-8041
> URL: https://issues.apache.org/jira/browse/PHOENIX-8041
> Project: Phoenix
> Issue Type: Bug
> Reporter: Viraj Jasani
> Assignee: Viraj Jasani
> Priority: Major
>
> PhoenixDriver.INSTANCE has one QueryServicesImpl per JVM, and all connections
> made through this driver share its thread pool. The pool's thread factory
> comes from Executors.defaultThreadFactory(), which puts every new thread in
> the ThreadGroup of the thread that created the factory. The pool allows core
> thread timeout, so when it is idle, all its threads exit. If that ThreadGroup
> is destroyed after this, the pool can no longer create threads, and every
> task submitted to it fails with IllegalThreadStateException.
> The pools in PhoenixHAExecutorServiceProvider have similar problem.
> While this is real concern, it is surfaced by DropColumnIT intermittent
> failures.
>
> {code:java}
> org.apache.phoenix.exception.PhoenixIOException
> at
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:1641)
> ...
> Caused by: java.lang.IllegalThreadStateException
> at java.lang.ThreadGroup.addUnstarted(ThreadGroup.java:865)
> at
> java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:629)
> at
> org.apache.phoenix.job.JobManager$ContextClassLoaderThreadFactory.newThread(JobManager.java:230)
> at
> java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:912)
> at
> org.apache.phoenix.iterate.ParallelIterators.submitWork(ParallelIterators.java:130)
> {code}
>
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)