You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michi Mutsuzaki (JIRA)" <ji...@apache.org> on 2014/03/25 22:35:15 UTC

[jira] [Commented] (ZOOKEEPER-1905) ZKClients are hitting KeeperException$ConnectionLossException due to wrong usage pattern

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

Michi Mutsuzaki commented on ZOOKEEPER-1905:
--------------------------------------------

Isn't the client supposed to queue requests while it's trying to connect to the server?

> ZKClients are hitting KeeperException$ConnectionLossException due to wrong usage pattern
> ----------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1905
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1905
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: tests
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.4.7
>
>
> Since the ZooKeeper client connection establishment happens in async way, the client should wait for the 'KeeperState.SyncConnected' event before start performing any ops. Many tests are having this kind of wrong pattern.
> Reference:- Below stack trace taken from build https://builds.apache.org/job/ZooKeeper-3.4-WinVS2008_java/465/
> {code}
>     [junit] 2014-03-19 08:36:53,056 [myid:] - INFO  [main:JUnit4ZKTestRunner$LoggedInvokeMethod@62] - TEST METHOD FAILED testChecksums
>     [junit] org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /crctest- 942
>     [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
>     [junit] 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
>     [junit] 	at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
>     [junit] 	at org.apache.zookeeper.server.CRCTest.testChecksums(CRCTest.java:127)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)