curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-94) PERMANENT registration should not be added to the services map.
Date Sat, 08 Mar 2014 18:16:48 GMT

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

Jordan Zimmerman commented on CURATOR-94:
-----------------------------------------

A big problem here is that the ServiceTypes aren't documented and, frankly, I don't remember
what they actually mean! Anyway, a test and pull request would be appreciated.

> PERMANENT registration should not be added to the services map.
> ---------------------------------------------------------------
>
>                 Key: CURATOR-94
>                 URL: https://issues.apache.org/jira/browse/CURATOR-94
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.4.0
>            Reporter: David Trott
>
> In ServiceDiscoveryImpl the registerService(...) method should be:
>     {
>         if (service.getServiceType() == ServiceType.STATIC)
>         {
>             services.put(service.getId(), service);
>         }
>         internalRegisterService(service);
>     }
> This prevents two side effects:
> + PERMANENT registration are not deleted when the ServiceDiscoveryImpl class is closed.
> + PERMANENT registration are not re-registered (potentially with old data) after a connection
loss event.
> The first case is a problem, since shutting down the registration app cleanly deletes
all PERMANENT registrations.
> Additionally since PERMANENT registrations do not use ephemeral nodes the re-registration
functionality is not needed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message