You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Jordan Zimmerman <jz...@netflix.com> on 2012/01/04 01:02:19 UTC

Connections take longer in 3.4.x?

I'm updating Curator to 3.4.x (3.4.2 to be exact). A lot of my tests have
failed and the culprit is that it appears to be taking a lot longer to get
the initial SysConnected. Of course, this is a flaw in my tests, but I
thought I'd mention it and see if anyone else has noticed this.

-JZ


Re: Connections take longer in 3.4.x?

Posted by Patrick Hunt <ph...@apache.org>.
On Tue, Jan 3, 2012 at 4:26 PM, Jordan Zimmerman <jz...@netflix.com> wrote:
> These are highly contrived scenarios. They all involve unit tests and the
> jerry-rigged TestingServer that I use for Curator
> (https://github.com/Netflix/curator/blob/master/curator-test/src/main/java/
> com/netflix/curator/test/TestingServer.java).
>
>>How much longer?
> It turns out that I had a number of tests that (incorrectly) were not
> waiting for SysConnected. I had to add in a wait (Curator's
> blockUntilConnectedOrTimedOut()). So, the implication is that when using
> ZK 3.3.x SysConnected for my unit tests was nearly instantaneous and now
> it takes more than a few milliseconds.

We've seen this in our tests prior to 3.4. We'll have tests that run
fine for a long time, then occasionally fail. When we looked we found
the test had a flaw similar to what you describe. It's a timing issue
for sure, but something the test needs to handle.

Patrick

Re: Connections take longer in 3.4.x?

Posted by Patrick Hunt <ph...@apache.org>.
On Tue, Jan 3, 2012 at 4:20 PM, Patrick Hunt <ph...@apache.org> wrote:
> On Tue, Jan 3, 2012 at 4:02 PM, Jordan Zimmerman <jz...@netflix.com> wrote:
>> I'm updating Curator to 3.4.x (3.4.2 to be exact). A lot of my tests have
>> failed and the culprit is that it appears to be taking a lot longer to get
>> the initial SysConnected. Of course, this is a flaw in my tests, but I
>> thought I'd mention it and see if anyone else has noticed this.


> Can you try it using the cli? zkCli.sh/ZooKeeperMain.class

I just tested this with 334 & 342 using the respective cli and in both
cases the shell gets connected nearly instantaneously.

Patrick

Re: Connections take longer in 3.4.x?

Posted by Jordan Zimmerman <jz...@netflix.com>.
These are highly contrived scenarios. They all involve unit tests and the
jerry-rigged TestingServer that I use for Curator
(https://github.com/Netflix/curator/blob/master/curator-test/src/main/java/
com/netflix/curator/test/TestingServer.java).

>How much longer? 
It turns out that I had a number of tests that (incorrectly) were not
waiting for SysConnected. I had to add in a wait (Curator's
blockUntilConnectedOrTimedOut()). So, the implication is that when using
ZK 3.3.x SysConnected for my unit tests was nearly instantaneous and now
it takes more than a few milliseconds.

>Under load or just generally slower.
No load at all. These are just unit tests, 1 or 2 connections.

>jdk versions change?
java version "1.6.0_29" (Apple)

-JZ



On 1/3/12 4:20 PM, "Patrick Hunt" <ph...@apache.org> wrote:

>On Tue, Jan 3, 2012 at 4:02 PM, Jordan Zimmerman <jz...@netflix.com>
>wrote:
>> I'm updating Curator to 3.4.x (3.4.2 to be exact). A lot of my tests
>>have
>> failed and the culprit is that it appears to be taking a lot longer to
>>get
>> the initial SysConnected. Of course, this is a flaw in my tests, but I
>> thought I'd mention it and see if anyone else has noticed this.
>
>How much longer? Under load or just generally slower. What's your
>ensemble setup/config look like? jdk versions change?
>
>Can you try it using the cli? zkCli.sh/ZooKeeperMain.class
>
>Might be interesting to compare log detail on the server (with trace
>turned on).
>
>Patrick
>


Re: Connections take longer in 3.4.x?

Posted by Patrick Hunt <ph...@apache.org>.
On Tue, Jan 3, 2012 at 4:02 PM, Jordan Zimmerman <jz...@netflix.com> wrote:
> I'm updating Curator to 3.4.x (3.4.2 to be exact). A lot of my tests have
> failed and the culprit is that it appears to be taking a lot longer to get
> the initial SysConnected. Of course, this is a flaw in my tests, but I
> thought I'd mention it and see if anyone else has noticed this.

How much longer? Under load or just generally slower. What's your
ensemble setup/config look like? jdk versions change?

Can you try it using the cli? zkCli.sh/ZooKeeperMain.class

Might be interesting to compare log detail on the server (with trace turned on).

Patrick