[
https://issues.apache.org/jira/browse/QPID-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keith Wall updated QPID-7396:
-----------------------------
Fix Version/s: (was: qpid-java-6.2)
Future
> [Java Broker] Await actual shutdown of TaskExecutor
> ---------------------------------------------------
>
> Key: QPID-7396
> URL: https://issues.apache.org/jira/browse/QPID-7396
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: qpid-java-6.1
> Reporter: Lorenz Quack
> Priority: Minor
> Fix For: Future
>
> Attachments:
> 0001-QPID-7396-Java-Broker-Await-actual-shutdown-of-TaskE.patch
>
>
> When calling {{TaskExecutorImpl#stop()}} or
> {{TaskExecutorImpl#stopImmediately()}} we call {{shutdown()}} or
> {{shutdownNow()}} on the underlying {{ExecutorService}}.
> According to the
> [documentation|https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html]
> these calls do not wait for the actual shutdown to happen. For this one must
> call {{ExecutorService#awaitTermination()}} (see example in the documentaion).
> I think this could cause a race condition for example in the UserPreference:
> * There is a task on the executor when the virtual host is being stopped
> * The executor is being shutdown but we do not await the termination
> * After the call to {{TaskExecutor#stop()}} we close the PreferenceStore
> * The task on the executor could still be executing leading to an
> {{IllegalStateException}} in the {{PreferenceStore}} or worse.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]