GitHub user shanthoosh opened a pull request: https://github.com/apache/samza/pull/519
SAMZA-1712: Tear down ZookeeperServer connections in ZkClient on interrupts. **Problem:** If a thread executing zkClient.close is interrupted, currently we swallow the ZkInterruptedException and proceed without closing the zookeeper connection. This leads to ephemeral nodes of StreamProcessor lurking around in zookeeper after StreamProcessor shutdown. Users had to wait till zookeeper server session timeout for the ephemeral nodes to get deleted. **Change:** Add fixed retries on InterruptedException when closing the zkClient. Misc changes: * Remove unnecessary null checks. * Remove unnecessary typecasts. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shanthoosh/samza handle_interrupted_exception_in_zkclient_close Alternatively you can review and apply these changes as the patch at: https://github.com/apache/samza/pull/519.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #519 ---- commit 42543da56701d0476e731860b0157a8af4365f56 Author: Shanthoosh Venkataraman <santhoshvenkat1988@...> Date: 2018-05-10T02:32:24Z Add fixed retries on InterruptedException when closing the zkClient. Misc changes: * Remove unnecessary null checks. * Remove unnecessary typecasts. ---- ---