accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1889) ZooKeeperInstance close method should mark instance closed.
Date Tue, 19 Nov 2013 17:45:59 GMT

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

ASF subversion and git services commented on ACCUMULO-1889:
-----------------------------------------------------------

Commit ada4180379d46297c1531cf8065de5030d12953d in branch refs/heads/1.6.0-SNAPSHOT from [~busbey]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ada4180 ]

ACCUMULO-1889 mark ZKI as closed once close() is called.

Once a given ZKI has .close() called, mark that instance closed regardless of outstanding
client count.

Signed-off-by: Eric Newton <eric.newton@gmail.com>


> ZooKeeperInstance close method should mark instance closed.
> -----------------------------------------------------------
>
>                 Key: ACCUMULO-1889
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1889
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.5.1, 1.6.0
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>             Fix For: 1.4.5, 1.5.1, 1.6.0
>
>         Attachments: ACCUMULO-1889.1.patch.txt
>
>
> (1.4.5 and 1.5.1 impact presumes ACCUMULO-1858 gets applied)
> The current close() implementation on ZooKeeperInstance only marks a given instance as
closed if the outstanding client count is 0.
> {code}
>   public synchronized void close() throws AccumuloException {
>     if (!closed && clientInstances.decrementAndGet() == 0) {
>       try {
>         zooCache.close();
>         ThriftUtil.close();
>       } catch (InterruptedException e) {
>         clientInstances.incrementAndGet();
>         throw new AccumuloException("Issues closing ZooKeeper.");
>       }
>       closed = true;
>     }
>   }
> {code}
> This is incorrect for two reason:
> 1) It allows continued operations on a given ZKI after it has had close() called on it
> 2) It allows a given ZKI to decrement the number of open clients more than once



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

Mime
View raw message