dafu created HELIX-40: ------------------------- Summary: fix zkclient subscribe path leaking and zk callback-handler leaking in case of session expiry Key: HELIX-40 URL: https://issues.apache.org/jira/browse/HELIX-40 Project: Apache Helix Issue Type: Bug Reporter: dafu Assignee: dafu zkclient subscribe path leaking: when a zk-path is deleted, zookeeper client will auto remove watchers from it watch set, but we also need to remove zk paths from zkclient's subscribe path set. this is achieved by calling zkclient.unsubscribe() whenever there is a zk path deleted. zk callback handler leaking: current-state listener and message listener are added during on-live-instance-change. we are not removing current-state listener and message listener when an instance is gone or a session is expired. the solution is keep a cache to remember what live-instance we saw last time, and upon live-instance change, we compare the current live-instance list against this list. remove current-state and message listener that belongs to instance/session that are no longer valid. we also need to clear the callback-handler list in zk-helix-manager during handle-new-session. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira