zookeeper-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] (ZOOKEEPER-2807) Flaky test: org.apache.zookeeper.test.WatchEventWhenAutoResetTest.testNodeDataChanged
Date Fri, 01 Dec 2017 14:56:00 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2807:
-------------------------------------------

Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/300#discussion_r154363054
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java ---
    @@ -327,6 +257,95 @@ public void run() {
             LOG.info("CommitProcessor exited loop!");
         }
     
    +    private void processCommittedRequest() throws IOException, InterruptedException {
    +        // In case of a spurious wakeup in waitForCommittedRequests we should not
    +        // remove the request from the queue until it has been processed
    +        Request request = committedRequests.peek();
    +
    +        if (request == null) {
    +            committedRequests.poll();
    --- End diff --
    
    If request==null then the committedRequests queue is already empty. Why do need to poll()
here?
    Could it be a small mistake and originally you wanted to poll() after the peek() was successful...?


> Flaky test: org.apache.zookeeper.test.WatchEventWhenAutoResetTest.testNodeDataChanged
> -------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2807
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2807
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Abraham Fine
>            Assignee: Abraham Fine
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message