zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper issue #273: ZOOKEEPER-2795 Change log level for "ZKShutdownHandler...
Date Fri, 17 Nov 2017 21:11:24 GMT
Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/273
  
    @phunt I'm trying to understand the problem you are describing. Please let me know what
I am missing.
    
    Since `QuorumZooKeeperServer` reimplements `setState` without `ZooKeeperServerShutdownHandler`
 I think this is only an issue when dealing with standalone ZooKeeper servers. 
    
    Standalone servers are only instantiated (outside of tests) in `ZooKeeperServerMain#runFromConfig`
(which also does the work of setting the `ZooKeeperServerShutdownHandler`).
    
    In other words, I think we are dealing with an unfortunate usage of inheritance. It would
be ideal to add this `ZooKeeperServerShutdownHandler` in a subclass of `ZooKeeperServer` used
only for standalone purposes but it looks like we did the opposite, putting in the `ZooKeeperServerShutdownHandler`
in the default case and reimplementing `setState` for the purpose of ignoring the `ZooKeeperServerShutdownHandler`
it in `QuorumZooKeeperServer`. 
    
    When the `ZooKeeperServerShutdownHandler` is needed it is always set (in production code).

    
    So I guess my question is, what problem would an operator be debugging with this log message?
     


---

Mime
View raw message