jonmv opened a new pull request, #1925: URL: https://github.com/apache/zookeeper/pull/1925
This fixes two bugs in shutdown logic, in the zookeeper server. 1. The `SendAckRequestProcessor` may die when attempting to close its `Learner` owner's socket, to signal that something went wrong, _if the learner already closed the socket because something (the same thing) went wrong (namely, the leader disconnecting). This is fixed by simply checking for nullity. 2. `ZooKeeperServer.shutdown(boolean)` is not present in child classes, so many uses here fail to properly shut down child resources, such as the `SyncRequestProcessor`. This is fixed by refactoring shutdown for the child classes. A unit test is also added, that fails when either of the two fixes are not present. To be precise, it fails only because the `SyncRequestProcessor` is never shut down (thread leak), once the first fix is applied; I didn't spend more time looking for other weird failures that may arise from what is obviously a bug anyway. See [ZOOKEEPER-4541](https://issues.apache.org/jira/browse/ZOOKEEPER-4541) for full details. -- 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-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org