You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by bitgaoshu <gi...@git.apache.org> on 2017/08/23 09:24:16 UTC

[GitHub] zookeeper pull request #342: ZOOKEEPER-2488: Synchronized access to shutting...

GitHub user bitgaoshu opened a pull request:

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

    ZOOKEEPER-2488: Synchronized access to shuttingDownLE in QuorumPeer

    

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

    $ git pull https://github.com/bitgaoshu/zookeeper ZOOKEEPER-2488

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

    https://github.com/apache/zookeeper/pull/342.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 #342
    
----
commit 478ba42dbb41ca7895255e4661bfd081d84c88d1
Author: bitgaoshu <bi...@gmail.com>
Date:   2017-08-23T09:12:53Z

    ZOOKEEPER-2488: Synchronized access to shuttingDownLE in QuorumPeer

----


---
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 #342: ZOOKEEPER-2488: Synchronized access to shutting...

Posted by bitgaoshu <gi...@git.apache.org>.
Github user bitgaoshu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/342#discussion_r135168943
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -1155,6 +1134,19 @@ public void run() {
             }
         }
     
    +    private void electionAndSetCurVote() {
    --- End diff --
    
    enen, i think the exception can be appropriately handled in this function, why need to throw the exception to  caller?  :)  thanks


---
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 #342: ZOOKEEPER-2488: Synchronized access to shutting...

Posted by maoling <gi...@git.apache.org>.
Github user maoling commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/342#discussion_r135038449
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -1155,6 +1134,19 @@ public void run() {
             }
         }
     
    +    private void electionAndSetCurVote() {
    --- End diff --
    
    IMHO,If you really want to refactor the code block(**Line1137-Line1149**)  **,throws Exception** may be better than catching exception in this function!


---
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 #342: ZOOKEEPER-2488: Synchronized access to shutting...

Posted by DanBenediktson <gi...@git.apache.org>.
Github user DanBenediktson commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/342#discussion_r134784530
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -1155,6 +1134,19 @@ public void run() {
             }
         }
     
    +    private void electionAndSetCurVote() {
    +        reconfigFlagClear();
    +        if (shuttingDownLE) {
    +            startLeaderElection();
    --- End diff --
    
    How come we don't need to set shuttingDownLE back to false here?


---
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 #342: ZOOKEEPER-2488: Synchronized access to shuttingDownLE ...

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

    https://github.com/apache/zookeeper/pull/342
  
    To provide some context here regarding this JIRA issue - it was found as part of work on ZOOKEEPER-2080: https://issues.apache.org/jira/browse/ZOOKEEPER-2080?focusedCommentId=15391189&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15391189


---
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 #342: ZOOKEEPER-2488: Synchronized access to shutting...

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

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


---
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 #342: ZOOKEEPER-2488: Synchronized access to shutting...

Posted by bitgaoshu <gi...@git.apache.org>.
Github user bitgaoshu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/342#discussion_r134908373
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -1155,6 +1134,19 @@ public void run() {
             }
         }
     
    +    private void electionAndSetCurVote() {
    +        reconfigFlagClear();
    +        if (shuttingDownLE) {
    +            startLeaderElection();
    --- End diff --
    
    oh, sorry. it's my negligence. i will fix


---
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.
---