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

Rakesh R commented on ZOOKEEPER-1907:
-------------------------------------

[~hdeng] [~phunt] sorry for the delay I was busy with other schedules.

bq.SessionTrackerImpl.java still contains new line
I have checked the latest patch by exec the following command in my unix 
machine to verify the newline characters. Its not showing any problem for me.
{code}
#!/usr/bin/env bash

if awk  '/\r$/{exit 0;} 1{exit 1;}' ZOOKEEPER-1907.patch
then
  echo "is DOS"
fi

if [[ "$(head -1 ZOOKEEPER-1907.patch)" == *$'\r' ]]; then echo DOS; fi
{code}

bq.Test org.apache.zookeeper.server.quorum.CommitProcessorTest FAILED (crashed)
Good catch. I hope the test case is failing due to the following reason. I will 
fix soon and update a patch. Please ping me any other causes. Thanks!
{code}
2014-07-24 10:56:37,543 [myid:] - ERROR 
[ZKDeathWatcherThread:ZooKeeperCriticalThread@47] - Severe unrecoverable error, 
from thread : ZKDeathWatcherThread
java.lang.NullPointerException
        at 
org.apache.zookeeper.server.ZooKeeperServer$ZKDeathWatcher.run(ZooKeeperServer.java:1084)
{code}

> Improve Thread handling
> -----------------------
>
>                 Key: ZOOKEEPER-1907
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1907
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.5.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1907.patch, ZOOKEEPER-1907.patch, 
> 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/%3cc2496325850aa74c92aaf83aa9662d26458a1...@szxeml561-mbx.china.huawei.com%3E]



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

Reply via email to