You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by "Zhen Zhang (JIRA)" <ji...@apache.org> on 2013/11/13 19:25:24 UTC

[jira] [Updated] (HELIX-40) fix zkclient subscribe path leaking and zk callback-handler leaking in case of session expiry

     [ https://issues.apache.org/jira/browse/HELIX-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhen Zhang updated HELIX-40:
----------------------------

    Fix Version/s: 0.7.0-incubating

> 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: Zhen Zhang
>            Assignee: Zhen Zhang
>             Fix For: 0.7.0-incubating
>
>
> 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 cache. 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 was sent by Atlassian JIRA
(v6.1#6144)