You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/07/13 00:23:18 UTC

[GitHub] reddycharan opened a new issue #1541: ReadOnlyBookie doesn't sets shutdownHandler to its statemanager

reddycharan opened a new issue #1541: ReadOnlyBookie doesn't sets shutdownHandler to its statemanager
URL: https://github.com/apache/bookkeeper/issues/1541
 
 
   **BUG REPORT**
   
   ReadOnlyBookie doesn't sets shutdownHandler to its statemanager.
   
   There are couple of issues with how 'stateManager' is handled in ReadOnlyBookie,
   
   1) ReadOnlyBookie creates its own stateManager in its constructor but it does not sets shutdownHandler. So if any fatal error (ZK_EXPIRED, BOOKIE_EXCEPTION, SERVER_EXCEPTION,..) happens then when it tries to shutdown using its shutdown handler, it will fail with NPE - for eg - https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieStateManager.java#L211
   
   2) Also, it is not correct to create stateManager instance in Bookie constructor and then again in ReadOnlyBookie constructor and override the instance created in super constructor. Because stateManager instance in super constructor is already exposed and passed on to other components/instances within the Bookie constructor for eg - https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#L729 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services