You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by "Jemiah Westerman (JIRA)" <ji...@apache.org> on 2015/05/20 23:55:02 UTC

[jira] [Created] (HELIX-598) ZkClientPool NPE after closing a connection

Jemiah Westerman created HELIX-598:
--------------------------------------

             Summary: ZkClientPool NPE after closing a connection
                 Key: HELIX-598
                 URL: https://issues.apache.org/jira/browse/HELIX-598
             Project: Apache Helix
          Issue Type: Bug
            Reporter: Jemiah Westerman


If a client gets a connection from ZkClientPool and then closes the connection by calling zkClient.close(), any future calls to getZkClient will NPE. The pool attempts to check if the connection is valid by calling "zkClient.getConnection().getZookeeperState() == States.CONNECTED", but for a closed connection the getConnection() call returns null.

Further, there is currently no way to ask the pool itself to close connections. There is a reset method, but reset simply discards the reference to the connection without closing it. ZkConnectionPool.reset() should close connections before dereferencing them.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)