[
https://issues.apache.org/jira/browse/CURATOR-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056849#comment-16056849
]
ASF GitHub Bot commented on CURATOR-295:
----------------------------------------
GitHub user serranom opened a pull request:
https://github.com/apache/curator/pull/225
CURATOR-295, removed cache close, catch provider close exceptions
we've been running this change in shipped production code for a few months
now.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/serranom/curator CURATOR-295
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/225.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 #225
----
----
> Service discovery close attempts to double-close caches
> -------------------------------------------------------
>
> Key: CURATOR-295
> URL: https://issues.apache.org/jira/browse/CURATOR-295
> Project: Apache Curator
> Issue Type: Bug
> Components: Framework
> Affects Versions: 2.9.1
> Reporter: Martin Serrano
>
> The {{ServiceDiscoveryImpl}} class close method closes all caches followed by
> closing all providers. The {{ServiceProviderImpl}} close method calls close
> on its associated cache as well. Since the cache is already closed, the
> close call throws an IllegalArgumentException which bubbles up. This causes
> the {{ServiceDiscoveryImpl}} close method to abort after the first provider
> is attempted to be closed, resulting in not closing the rest of the providers
> or any of the listeners associated with the discovery instance.
> The {{ServiceDiscoveryImpl}} close method should not close caches and it
> should wrap the provider closes with try/catch so that failure to close one
> does not prevent others from being closed or the listeners.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)