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

Flavio Junqueira commented on ZOOKEEPER-1798:
---------------------------------------------

Thanks for commenting, [~thawan].

bq. The observer don't need to wait for a request to be persisted on disk 
before applying to the db right?

Correct, but the test tries to make sure that the change has been persisted to 
disk, which contradicts the fact that persistent is not strictly necessary. I 
think the goal of the test case was to test functionality rather than checking 
that it is strictly enforce. I was thinking of having some way to have 
SyncRequestProcessor indicate that a request has gone through, but I thought 
that the approach I proposed in the patch was simpler.

bq. Currently, the test is failing because of timing issue but this shouldn't 
affect the correctness of the system.

Agreed, but we shouldn't have a release with tests failing. We need to either 
fix the test or the code base.

bq.  So we just add some delay in the test or some mechanism to make sure that 
request get flushed before we do the verify step instead.

In general, I don't like the idea of adding delays. They are difficult to 
calibrate and prone to false positives.

 bq. So we don't have to pay for the cost of extra latency on running system.

I'm not convinced that the performance penalty would be that bad. If the system 
is not saturated, then the latency is under control and it should be a few 
milliseconds.

> testNormalObserverRun failed on branch 3.4
> ------------------------------------------
>
>                 Key: ZOOKEEPER-1798
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1798
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>            Priority: Blocker
>             Fix For: 3.4.6
>
>         Attachments: TEST-org.apache.zookeeper.server.quorum.Zab1_0Test.txt, 
> ZOOKEEPER-1798-b3.4.patch, ZOOKEEPER-1798-b3.4.patch
>
>
> This is the output messges:
> <noformat>
> Testcase: testNormalObserverRun took 4.221 sec
>         FAILED
> expected:<data[2]> but was:<data[1]>
> junit.framework.AssertionFailedError: expected:<data[2]> but was:<data[1]>
>         at 
> org.apache.zookeeper.server.quorum.Zab1_0Test$8.converseWithObserver(Zab1_0Test.java:1118)
>         at 
> org.apache.zookeeper.server.quorum.Zab1_0Test.testObserverConversation(Zab1_0Test.java:546)
>         at 
> org.apache.zookeeper.server.quorum.Zab1_0Test.testNormalObserverRun(Zab1_0Test.java:994)
> <noformat>



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

Reply via email to