[
https://issues.apache.org/jira/browse/BOOKKEEPER-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656907#comment-13656907
]
Ivan Kelly commented on BOOKKEEPER-610:
---------------------------------------
{quote}
Its trying to mark the bookie as r-o mode using zk. Since zk is already closed,
will throw connection exception.
{quote}
[~rakeshr] Unless the exception is a runtime exception, it's not getting past
allDisksFull() as allDisksFull throws nothing.
{quote}
One downside that I could see is that using an executor, you could not actually
stop scheduling the checkpointing tasks when a bookie encountered critical
exceptions, you silenced the exceptions{quote}
When a fatal exception occurs, the bookie calls shutdown on the sync thread,
which calls shutdown on the executor. This stops any new checkpoint tasks being
scheduled.
{quote}
I prefer the original implementation, since it makes the flow clearer
{quote}
Of course this is fully subjective, but I completely disagree. The original
code has a bunch of boolean flags which control the flow through the
#checkpoint() and #run() methods, 'running', 'flushFailed', 'flushing'. If you
get a stacktrace from that code, you can't see that the values of these flags
are, and therefore it's hard to see what path has lead up to the current
stacktrace.
{quote}
Another problem in your exception handling is a bit difference from the
original implementation and these exceptions handling are also hidden from the
ledger dirs listener. it was a bit difficult to find an issue, especially for
the cases, e.g. shutting down. {quote}
Ah, there is a change in the exception handling i missed. Will fix.
> 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
>
>
> 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