You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/11/05 18:19:43 UTC

[GitHub] [zookeeper] lvfangmin commented on pull request #1766: ZOOKEEPER-4387 Close ZkDb when ZooKeeper Server shutdown

lvfangmin commented on pull request #1766:
URL: https://github.com/apache/zookeeper/pull/1766#issuecomment-962115998


   ZkDatabase instance is reused, there is no `close` concept, it only clears the in memory data tree when fully shutdown is required. So the close function seems misleading, which seems closing the ZkDatabase instance, but actually it only closes the current streams in snapLog. 
   
   Also, the snapLog is initialized and passed into ZkDatabase, so the lifecycle is not tied to the ZkDatabase, ZkDatabase.close() to close the current open streams in snapLog seems a little strange.
   
   @Shoothzj for the unit test case, is there a way to close the snapLog directly instead of the zkDb? If not would suggest to rename the close() to a less misleading name at least.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org