You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Ioannis Canellos (JIRA)" <ji...@apache.org> on 2013/10/07 10:06:41 UTC

[jira] [Resolved] (CURATOR-39) ServiceProvider thread is not closed during ServiceDiscovery close

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

Ioannis Canellos resolved CURATOR-39.
-------------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: TBD)
                   2.3.0

Agree,

I think that the root cause falls back to the PatchChildrenCache issue with the ClosingExecutorService aka CURATOR-27.

Since, CURATOR-27 is now resolved, I think that we need to resolve this one too as duplicate.

> ServiceProvider thread is not closed during ServiceDiscovery close
> ------------------------------------------------------------------
>
>                 Key: CURATOR-39
>                 URL: https://issues.apache.org/jira/browse/CURATOR-39
>             Project: Apache Curator
>          Issue Type: Bug
>            Reporter: Colin Morelli
>            Assignee: Ioannis Canellos
>             Fix For: 2.3.0
>
>
> I'm using 2.0.1-incubating, using the following to build a ServiceProvider:
> serviceProvider = serviceDiscovery.serviceProviderBuilder()
>                     .serviceName(name)
>                     .providerStrategy(new RoundRobinStrategy<DiscoverableService>())
>                     .build();
> serviceProvider.start();
> I have a name => ServiceProvider map that stores all my service providers. During shutdown, I call:
>         for (ServiceProvider serviceProvider : serviceProviderMap.values()) {
>             serviceProvider.close();
>         }
>         serviceDiscovery.close();
> Which is redundant, it seems, because serviceDiscovery itself appears to shutdown the providers. However, I still end up with a dangling "ServiceProvider-0" thread that keeps Tomcat open.
> If I start the container up, without making a service call (so I don't allocate any ServiceProviders), Tomcat shuts down cleanly. As soon as a ServiceProvider is allocated (by making a service call) Tomcat hangs during shutdown, and informs me of the remaining thread. I will try to provide more information as it becomes available to me.



--
This message was sent by Atlassian JIRA
(v6.1#6144)