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

Akihiro Suda commented on ZOOKEEPER-2205:
-----------------------------------------

Hi there,

I think ZK should throw an exception rather than just printing LOG.warn() in 
such an unexpected case.

Sometimes(only in really unexpected cases) it might be also helpful to invoke 
System.exit(), because it is easier to debug a dead system than to debug a 
system running in a weired state.
The patch attached in [ZOOKEEPER-2162](infinite exception loop) is an example 
where it might be helpful to do so.


> Log type of unexpected quorum packet in learner handler loop
> ------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2205
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2205
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hitoshi Mitake
>            Assignee: Hitoshi Mitake
>            Priority: Trivial
>         Attachments: ZOOKEEPER-2205-v2.patch, ZOOKEEPER-2205.patch
>
>
> Current learner handler loop doesn't log anything when it receives unexpected 
> type of quorum packet from learner.
> This patch lets the learner handler loop log the type of packet for defensive 
> purpose. It would make debugging and trouble shooting a little bit easier.



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

Reply via email to