zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjward <...@git.apache.org>
Subject [GitHub] zookeeper pull request #529: [ZOOKEEPER-2368] Send a watch event is when a c...
Date Mon, 18 Jun 2018 15:23:18 GMT
Github user timothyjward commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1438,6 +1436,11 @@ public void disconnect() {
    +        try {
    +            sendThread.join();
    +        } catch (InterruptedException ex) {
    +            LOG.warn("Got interrupted while waiting for the sender thread to close",
    +        }
    --- End diff --
    If the `queueEventOfDeath` call moves above the `join` call then some events can be missed.

    Specifically closing the connection's eventOfDeath can be processed before completing
the send of the session disconnection message triggered in disconnect. 
    I tried moving the queueEventOfDeath above the join, but then some of the core tests began
failing intermittently. This was remedied by moving the eventOfDeath back after the completion
of the send thread.


View raw message