curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-164) curator-x-discovery: unregisterService is not guaranteed to remove the service, due to reconnectListener concurrency issue
Date Fri, 10 Apr 2015 04:41:12 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488892#comment-14488892
] 

ASF GitHub Bot commented on CURATOR-164:
----------------------------------------

GitHub user madrob opened a pull request:

    https://github.com/apache/curator/pull/72

    CURATOR-164 prevent phantom services

    When ServiceDiscovery reregisters services after a reconnection, it's
    possible to add back a service that was already deleted. This is why
    we need to remove the service from the cache before deleting it from
    zookeeper.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/madrob/curator CURATOR-164

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/72.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #72
    
----
commit 9dc3ba5a6f0b2b7cfd3254eec5d8c94d89ae4022
Author: Mike Drob <mdrob@cloudera.com>
Date:   2015-04-10T00:59:31Z

    CURATOR-164 prevent phantom services
    
    When ServiceDiscovery reregisters services after a reconnection, it's
    possible to add back a service that was already deleted. This is why
    we need to remove the service from the cache before deleting it from
    zookeeper.

----


> curator-x-discovery: unregisterService is not guaranteed to remove the service, due to
reconnectListener concurrency issue
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CURATOR-164
>                 URL: https://issues.apache.org/jira/browse/CURATOR-164
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.7.0
>            Reporter: Rasmus Berg Palm
>            Priority: Critical
>
> In ServiceDiscoveryImpl:
> When unregistering a service, the reconnect listener might fire while deleting the path.
> This can cause a condition where the delete finishes successfully, the service is removed
from services, and then the reRegisterServices completes successfully and the service is added
back in ZK and in services, end result being that the service was not removed, even though
unregisterService did not throw any exceptions. 
> Essentially the use of the internal 'services' cache makes for a nightmare of concurrency
issues. I put this as critical as the library it's really not usable IMO.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message