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-408) Handle graceful close of ZookKeeper client waiting for all resources to be released
Date Sun, 24 Jun 2018 16:16:00 GMT

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

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

Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/curator/pull/266#discussion_r197644995
  
    --- Diff: curator-client/src/main/java/org/apache/curator/HandleHolder.java ---
    @@ -73,15 +73,15 @@ String getNewConnectionString()
             return ((helperConnectionString != null) && !ensembleProvider.getConnectionString().equals(helperConnectionString))
? helperConnectionString : null;
         }
     
    -    void closeAndClear() throws Exception
    +    void closeAndClear(int timeout) throws Exception
    --- End diff --
    
    done


> Handle graceful close of ZookKeeper client waiting for all resources to be released
> -----------------------------------------------------------------------------------
>
>                 Key: CURATOR-408
>                 URL: https://issues.apache.org/jira/browse/CURATOR-408
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Client
>    Affects Versions: 4.0.0
>            Reporter: Enrico Olivelli
>            Assignee: Enrico Olivelli
>            Priority: Major
>
> Ths idea is to leverage the new ZooKeeper#close(timeoutMs) method introduced with ZOOKEEPER-2697.
> This new method waits for the internal threads to finish, this way the client is sure
that all internal resources handled but low-level ZooKeeper client have been released.
> This is very useful in tests because the user can wait for the test environment to be
cleared.
> In some cases you want to return from the 'close' method as soon as possibile. In ZooKeeper
a new specific method as been added in order to let the user ask for a specific behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message