You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by afine <gi...@git.apache.org> on 2017/08/03 20:11:19 UTC

[GitHub] zookeeper pull request #327: ZOOKEEPER-2786 Flaky test: org.apache.zookeeper...

GitHub user afine opened a pull request:

    https://github.com/apache/zookeeper/pull/327

    ZOOKEEPER-2786 Flaky test: org.apache.zookeeper.test.ClientTest.testNonExistingOpCode

    This is the third time this failure has popped up. This time it seemed to only impact tests run using NettyServerCnxnFactory (so it only impacts 3.5 and master) and I was able to get it to pop up with sufficient frequency when running the tests locally. 
    
    The issue is caused by improper handling of netty's futures. When we call `channel.write(wrappedBuffer(sendBuffer));` the write is completed asynchronously. The close call `channel.close();` is also asynchronous. So we can run into the case where the close occurs before a write.
    
    This patch changes our close call to be a callback for the completion of an empty write. This way we are guaranteed that the channel has "drained" before a close. 
    
    My primary concern with this patch is the channel being used while it is closing (between the write of an empty buffer and the execution of the close callback). I have added a `closingChannel` boolean to track that, which I believe is sufficient. Let me know if anyone finds a situation where that is not the case.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afine/zookeeper ZOOKEEPER-2786_third_times_a_charm

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/327.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #327
    
----
commit 6e16b20cd2f768e9a027f1d9306ae8126188edb4
Author: Abraham Fine <af...@apache.org>
Date:   2017-08-03T20:02:06Z

    ZOOKEEPER-2786: Flaky test: org.apache.zookeeper.test.ClientTest.testNonExistingOpCode

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper issue #327: ZOOKEEPER-2786 Flaky test: org.apache.zookeeper.test.C...

Posted by hanm <gi...@git.apache.org>.
Github user hanm commented on the issue:

    https://github.com/apache/zookeeper/pull/327
  
    The following up Netty fix to this flaky test is committed to master: e104175bb47baeb800354078c015e78bfcb7c953 and 3.5 23962f12395ada67e689b8ff57573fc1398a54eb


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper pull request #327: ZOOKEEPER-2786 Flaky test: org.apache.zookeeper...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zookeeper/pull/327


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---