You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2014/07/18 19:56:05 UTC

[jira] [Commented] (ZOOKEEPER-1907) Improve Thread handling

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

Patrick Hunt commented on ZOOKEEPER-1907:
-----------------------------------------

[~rakeshr] and [~rgs] any progress on this? I can't tell from the most recent comment(s) if this is ready or still updates are planned? Please "cancel" the patch if it's not ready for submission. Thanks.

> Improve Thread handling
> -----------------------
>
>                 Key: ZOOKEEPER-1907
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1907
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.6.0
>
>         Attachments: ZOOKEEPER-1907.patch, ZOOKEEPER-1907.patch, ZOOKEEPER-1907.patch, ZOOKEEPER-1907.patch
>
>
> Server has many critical threads running and co-ordinating each other like  RequestProcessor chains et. When going through each threads, most of them having the similar structure like:
> {code}
> public void run() {
>         try {
>               while(running)
>                    // processing logic
>               }
>         } catch (InterruptedException e) {
>             LOG.error("Unexpected interruption", e);
>         } catch (Exception e) {
>             LOG.error("Unexpected exception", e);
>         }
>         LOG.info("...exited loop!");
> }
> {code}
> From the design I could see, there could be a chance of silently leaving the thread by swallowing the exception. If this happens in the production, the server would get hanged forever and would not be able to deliver its role. Now its hard for the management tool to detect this.
> The idea of this JIRA is to discuss and imprv.
> Reference: [Community discussion thread|http://mail-archives.apache.org/mod_mbox/zookeeper-user/201403.mbox/%3CC2496325850AA74C92AAF83AA9662D26458A1D67@szxeml561-mbx.china.huawei.com%3E]



--
This message was sent by Atlassian JIRA
(v6.2#6252)