[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15198855#comment-15198855
 ] 

Patrick Hunt commented on ZOOKEEPER-2387:
-----------------------------------------

bq. how does the shutdown hook conceal any exceptions due to corner cases which 
may occur

It's not really about that at all, it's not specifically exceptions that might 
occur during the shutdown hook.

It's more about ZK itself, overall, being robust to unexpected failures. Today 
without graceful shutdown we make every shutdown non-graceful. It's stressing 
the system every time we shut down rather than only stressing the system when 
an unexpected failure happens. This causes code which normally (with graceful 
shutdown) would only be tested in rare situations be tested more frequently. So 
whether it's the log recovery code, or the snapshot recovery code, or the 
communication between servers, we tend to stress these code paths more 
frequently as a result (granted it's not every time, because we might not be 
writing out a wal, etc... during process shutdown but hopefully you see it's 
more likely).

> Attempt to gracefully stop the 
> -------------------------------
>
>                 Key: ZOOKEEPER-2387
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2387
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Biju Nair
>            Assignee: Biju Nair
>         Attachments: ZOOKEEPER-2387-1.patch
>
>
> To stop ZooKeeper service, {{kill}} is issued against the ZK process. It will 
> be good to gracefully stop all the subcomponents.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to