Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55551DF52 for ; Sat, 2 Feb 2013 02:10:37 +0000 (UTC) Received: (qmail 8570 invoked by uid 500); 2 Feb 2013 02:10:37 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 8547 invoked by uid 500); 2 Feb 2013 02:10:37 -0000 Mailing-List: contact commits-help@helix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.incubator.apache.org Delivered-To: mailing list commits@helix.incubator.apache.org Received: (qmail 8538 invoked by uid 99); 2 Feb 2013 02:10:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 02:10:37 +0000 X-ASF-Spam-Status: No, hits=-2000.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 02 Feb 2013 02:10:33 +0000 Received: (qmail 8029 invoked by uid 99); 2 Feb 2013 02:10:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 02:10:12 +0000 Date: Sat, 2 Feb 2013 02:10:12 +0000 (UTC) From: "dafu (JIRA)" To: commits@helix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HELIX-40) fix zkclient subscribe path leaking and zk callback-handler leaking in case of session expiry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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