curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Morello (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-72) Background operations don't wait for connection timeout
Date Sun, 12 Jan 2014 17:17:52 GMT

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

Michael Morello commented on CURATOR-72:
----------------------------------------

There's a kind of race condition :

First CuratorFramework-0-EventThread  sets connection state to RECONNECTED because Zookeeper
told it to do so
{quote}
	at org.apache.curator.framework.state.ConnectionStateManager.addStateChange(ConnectionStateManager.java:159)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.validateConnection(CuratorFrameworkImpl.java:757)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processEvent(CuratorFrameworkImpl.java:717)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.access$000(CuratorFrameworkImpl.java:56)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl$1.process(CuratorFrameworkImpl.java:133)
	at org.apache.curator.ConnectionState.process(ConnectionState.java:145)
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:519)
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:495)
{quote}

Right after CuratorFramework-0 sets connection state to LOST because of a background retry
that is still in the pipeline :
{quote}
	at org.apache.curator.framework.state.ConnectionStateManager.addStateChange(ConnectionStateManager.java:168)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.logError(CuratorFrameworkImpl.java:517)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkBackgroundRetry(CuratorFrameworkImpl.java:593)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:699)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:665)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:56)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl$3.call(CuratorFrameworkImpl.java:244)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
{quote}


> Background operations don't wait for connection timeout
> -------------------------------------------------------
>
>                 Key: CURATOR-72
>                 URL: https://issues.apache.org/jira/browse/CURATOR-72
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.3.0
>            Reporter: Evaristo Camarero
>            Assignee: Jordan Zimmerman
>             Fix For: 2.4.0
>
>         Attachments: TestListener.java, TestListenerConnectedAtStart.java, TestListenerSequence.java,
TestListenerWithLeaderSelector.java, test.java
>
>
> Background operations don't wait for the configured connection timeout before failing.
Attached test shows the problem.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message