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?
     


---

Reply via email to