helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dafu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HELIX-124) race condition in ZkHelixManager.handleNewSession()
Date Tue, 06 Aug 2013 21:10:47 GMT

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

dafu updated HELIX-124:

    Issue Type: Sub-task  (was: Bug)
        Parent: HELIX-134
> race condition in ZkHelixManager.handleNewSession()
> ---------------------------------------------------
>                 Key: HELIX-124
>                 URL: https://issues.apache.org/jira/browse/HELIX-124
>             Project: Apache Helix
>          Issue Type: Sub-task
>            Reporter: dafu
> ZkHelixManager.handleNewSession() is an async callback. There is a race condition when
we have multiple consecutive session expiries. for example:
> 1) sessionExpiry_0 happens, and newSessionId is sessionId_1
> 2) sessionExpiry_1 happens, and newSessionId is sessionId_2
> 3) handleNewSession caused by sessionExpiry_0 is invoked
> 4) handleNewSession caused by sessionExpiry_1 is invoked
> Since 3) and 4) both happen after 2), we will get zk handleNewSession callback twice
with the same session id (sessionId_2)
> This is problematic:
> if the manager is a PARTICIPANT, the second handleNewSession() will fail to create live-instance
and reset all listeners. then we come to the situation where live-instance exists but no listener
is registered for the PARTICIPANT
> if the manager is a CONTROLLER, we add listeners twice

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

View raw message