[ 
https://issues.apache.org/jira/browse/CURATOR-557?focusedWorklogId=378054&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-378054
 ]

ASF GitHub Bot logged work on CURATOR-557:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/20 06:24
            Start Date: 28/Jan/20 06:24
    Worklog Time Spent: 10m 
      Work Description: naude-r commented on pull request #343: [CURATOR-557] 
ServiceCacheImpl does not close ExecutorService
URL: https://github.com/apache/curator/pull/343#discussion_r371626468
 
 

 ##########
 File path: 
curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java
 ##########
 @@ -43,13 +46,21 @@
     private final ProviderStrategy<T> providerStrategy;
     private final DownInstanceManager<T> downInstanceManager;
 
-    public ServiceProviderImpl(ServiceDiscoveryImpl<T> discovery, String 
serviceName, ProviderStrategy<T> providerStrategy, ThreadFactory threadFactory, 
List<InstanceFilter<T>> filters, DownInstancePolicy downInstancePolicy)
+    public ServiceProviderImpl(ServiceDiscoveryImpl<T> discovery, String 
serviceName, ProviderStrategy<T> providerStrategy, ThreadFactory threadFactory, 
CloseableExecutorService executorService, List<InstanceFilter<T>> filters, 
DownInstancePolicy downInstancePolicy)
 
 Review comment:
   done. constructor was made protected so that:
   * it can be extended in future
   * ServiceProviderBuilderImpl can access it.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 378054)
    Time Spent: 1h 20m  (was: 1h 10m)

> ServiceCacheImpl does not close ExecutorService
> -----------------------------------------------
>
>                 Key: CURATOR-557
>                 URL: https://issues.apache.org/jira/browse/CURATOR-557
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.2.0
>            Reporter: Roelof Naude
>            Priority: Major
>         Attachments: CURATOR-557.patch
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> ServiceCacheImpl does not close the ExecutorService instance created from the 
> ThreadFactory:
> [https://github.com/apache/curator/blob/master/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java#L64]
>  
> CloseableExecutorService::CloseableExecutorService(ExecutorService) call 
> this(executorService, false) which sets shutdownOnClose to false. 
>  
> this has an impact from callers, eg ServiceProviderImpl, which only allow 
> only a ThreadFactory to be specified.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to