[
https://issues.apache.org/jira/browse/BOOKKEEPER-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13659571#comment-13659571
]
Ivan Kelly commented on BOOKKEEPER-610:
---------------------------------------
The new patch addresses the shutdown deadlock. Shutdown is on the SyncThread is
only ever called from the bookie. If it is called from a bookie callback (such
as in the listener) it goes through triggerBookieShutdown(), which spawns a
separate thread to do it. I've changed triggerBookieShutdown to start the
thread, but not to join it. joining the new thread makes no sense. You are
effectively calling shutdown() directly if you join the thread. The thread will
clean up after itself once run is finished.
I also changed the order of cleanup in shutdown to match the dependencies
between the components. I don't close zk until everything that uses it is also
shutdown. Finally, i've put a check in transitionToReadOnlyMode to only do so
if the bookie is not shutting down.
> Make SyncThread use an executor
> -------------------------------
>
> Key: BOOKKEEPER-610
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-610
> Project: Bookkeeper
> Issue Type: Bug
> Reporter: Ivan Kelly
> Assignee: Ivan Kelly
> Fix For: 4.3.0
>
> Attachments:
> 0001-BOOKKEEPER-610-Make-SyncThread-use-an-executor.patch,
> 0001-BOOKKEEPER-610-Make-SyncThread-use-an-executor.patch,
> 0001-BOOKKEEPER-610-Make-SyncThread-use-an-executor.patch,
> 0001-BOOKKEEPER-610-Make-SyncThread-use-an-executor.patch
>
>
> Currently we have a bunch of boolean variables to control the lifecycle of
> the SyncThread. We're effectively replicating what an Executor does, so we
> should just use an executor.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira