[
https://issues.apache.org/jira/browse/ZOOKEEPER-4873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888692#comment-17888692
]
luoxin commented on ZOOKEEPER-4873:
-----------------------------------
!image-2024-10-11-22-59-59-190.png!
If already shut down, canShutdown() should return false; otherwise, it should
return true.
> An exception occurring in the INITIAL state of ZooKeeper can result in
> resource leaks.
> --------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4873
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4873
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: luoxin
> Priority: Major
> Attachments: image-2024-10-11-22-59-59-190.png
>
>
> Currently, org.apache.zookeeper.server.ZooKeeperServer#canShutdown only
> checks the *Running* and *Error* states of the ZooKeeperServer. If an
> exception occurs in the *INITIAL* state,
> org.apache.zookeeper.server.ZooKeeperServer#shutdown(boolean) may not work
> properly, potentially leading to a resource leak.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)