helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhen Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HELIX-40) fix zkclient subscribe path leaking and zk callback-handler leaking in case of session expiry
Date Wed, 13 Nov 2013 18:25:25 GMT

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

Zhen Zhang resolved HELIX-40.
-----------------------------

    Resolution: Fixed

> 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)

Mime
View raw message