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

Michi Mutsuzaki commented on ZOOKEEPER-1442:
--------------------------------------------

Hi Jeremy,

* ZooKeeperServerMain creates a ServerConfig, which in turn creates 
QuorumPeerConfig that parses a config file. You can modify 
QuorumPeerConfig.parseProperties() to include the new flag.
* Then, initialize the flag in ServerConfig.readFrom().
* Coming back to ZooKeeperServerMain, runFromConfig() calls 
ServerCnxnFactory.configure(). You can probably add a new parameter here to 
pass the flag to ServerCnxnFactory. 
* You might need to move the Thread.setDefaultUncaughtExceptionHandler() call 
in NIOServerCnxnFactory since it doesn't have the flag until configure() is 
called. 
* Finally, include the flag in ZooKeeperServer.dumpConf() so that it gets 
printed with "conf" 4-letter word command. 

--Michi
                
> Uncaught exception handler should exit on a java.lang.Error
> -----------------------------------------------------------
>
>                 Key: ZOOKEEPER-1442
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1442
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client, server
>    Affects Versions: 3.4.3, 3.3.5
>            Reporter: Jeremy Stribling
>            Assignee: Jeremy Stribling
>            Priority: Minor
>         Attachments: ZOOKEEPER-1442.patch
>
>
> The uncaught exception handler registered in NIOServerCnxnFactory and 
> ClientCnxn simply logs exceptions and lets the rest of ZooKeeper go on its 
> merry way.  However, errors such as OutOfMemoryErrors should really crash the 
> program, as they represent unrecoverable errors.  If the exception that gets 
> to the uncaught exception handler is an instanceof a java.lang.Error, ZK 
> should exit with an error code (in addition to logging the error).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to