zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakeshadr <...@git.apache.org>
Subject [GitHub] zookeeper pull request #176: ZOOKEEPER-2687:Deadlock while shutting down the...
Date Wed, 15 Feb 2017 11:44:41 GMT
Github user rakeshadr commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/Leader.java ---
    @@ -590,8 +590,8 @@ void lead() throws IOException, InterruptedException {
                         // check leader running status
                         if (!this.isRunning()) {
    -                        shutdown("Unexpected internal error");
    -                        return;
    +                        shutdownMessage = "Unexpected internal error";
    --- End diff --
    Good catch @arshadmohammad. Yes, this is another code where it can leads to deadlock similar
to ZK-2380. 
    As we know, `shutdownMessage` is acting as flag. Could you please add comments to make
this clear,
    `// set shutdown flag`
    `shutdownMessage` = "Unexpected internal error";`

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.

View raw message