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-315) Reconnect during InterProcessSemaphoreV2.acquire can lead to orphaned node
Date Mon, 11 Apr 2016 21:06:25 GMT

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

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

GitHub user ulle opened a pull request:

    https://github.com/apache/curator/pull/143

    [CURATOR-315] Reconnect during InterProcessSemaphoreV2.acquire can lead to orphaned node

    Only add successfully acquired leases to the builder passed to internalAcquire1Lease.
Close leases on other return paths.
    This ensures that acquire does not return more leases than requested, as it is expected
by the convenience methods for acquiring a single lease.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ulle/curator CURATOR-315

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/143.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 #143
    
----
commit 613a51be4535544e990d31e485674e237bd7e2da
Author: Ulrich Geilmann <ugeilmann@googlemail.com>
Date:   2016-04-11T13:32:29Z

    Return leases before retrying aquire

----


> Reconnect during InterProcessSemaphoreV2.acquire can lead to orphaned node
> --------------------------------------------------------------------------
>
>                 Key: CURATOR-315
>                 URL: https://issues.apache.org/jira/browse/CURATOR-315
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 3.1.0, 2.10.0
>            Reporter: Ulrich Geilmann
>
> Acquiring and releasing a lease can lead to a leftover node when the client has to reconnect.
Subsequent attempts to acquire a lease on the same path fail when max leases is reached due
to these nodes.
> Here's an excerpt of the client log when that happened:
> {noformat}
> 2016-04-11 10:50:03.634+0000 UTC - INFO org.apache.curator.ConnectionState - Connection
attempt unsuccessful after 81663 (greater than max timeout of 60000). Resetting connection
and trying again with a new connection. 
> 2016-04-11 10:50:03.638+0000 UTC - INFO org.apache.zookeeper.ZooKeeper - Session: 0x15404ee16da0015
closed 
> 2016-04-11 10:50:03.638+0000 UTC - INFO org.apache.zookeeper.ZooKeeper - Initiating client
connection, connectString=172.16.45.128:2181,172.16.45.192:2181,172.16.45.56:2181 sessionTimeout=60000
watcher=org.apache.curator.ConnectionState@34129c78 
> 2016-04-11 10:50:03.640+0000 UTC - INFO org.apache.zookeeper.ClientCnxn - Opening socket
connection to server 172.16.45.128/172.16.45.128:2181. Will not attempt to authenticate using
SASL (unknown error) 
> 2016-04-11 10:50:03.640+0000 UTC - INFO org.apache.zookeeper.ClientCnxn - Socket connection
established to 172.16.45.128/172.16.45.128:2181, initiating session 
> 2016-04-11 10:50:03.643+0000 UTC - INFO org.apache.zookeeper.ClientCnxn - Session establishment
complete on server 172.16.45.128/172.16.45.128:2181, sessionid = 0x25404f0136d0011, negotiated
timeout = 40000 
> 2016-04-11 10:50:03.643+0000 UTC - INFO o.a.c.f.s.ConnectionStateManager - State change:
RECONNECTED 
> 2016-04-11 10:50:03.644+0000 UTC - INFO o.a.c.f.r.l.InterProcessSemaphoreV2 - Sequential
path not found: /locking/leases/_c_32448fde-1af3-472f-91ff-ec8a4c4b5034-lease-0000000002 
> 2016-04-11 10:50:03.644+0000 UTC - INFO org.apache.zookeeper.ClientCnxn - EventThread
shut down 
> 2016-04-11 10:50:06.625+0000 UTC - INFO o.a.c.f.r.l.InterProcessSemaphoreV2 - Lease already
released 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message