[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-08-25 Thread Mahadev konar (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mahadev konar updated ZOOKEEPER-2:
--

   Resolution: Fixed
Fix Version/s: 3.0.0
 Hadoop Flags: [Reviewed]
   Status: Resolved  (was: Patch Available)

I just committed this. Thanks Flavio.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Fix For: 3.0.0
>
> Attachments: patch-le-polish, patch-le-polish, ZOOKEEPER-2.patch
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-08-25 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: (was: ZOOKEEPER-2.patch)

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish, ZOOKEEPER-2.patch
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-08-25 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: ZOOKEEPER-2.patch

Added javadoc comments.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish, ZOOKEEPER-2.patch
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-08-13 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Status: Patch Available  (was: Open)

Submitted a new patch with the problem that Pat pointed out fixed.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish, ZOOKEEPER-2.patch
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-08-12 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: ZOOKEEPER-2.patch

Variable state on QuorumPeer was not initialized, so the exceptions Pat 
observed. I fixed it, and generated a patch against the apache repository. 
QuorumTest still fails, but it fails in my computer even without this patch 
with the same erros, so I don't think it is a problem with this patch.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish, ZOOKEEPER-2.patch
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-07-31 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-2:
-

Status: Open  (was: Patch Available)

This patch fails "ant test", specifically I see alot of the following in the 
log:

Exception in thread "QuorumPeer" java.lang.NullPointerException
at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:397)

(I ran the tests 3 times, failed each time in the same way, mainline test 
passes fine)
This is ubuntu machine with java 1.6.0_06 (single cpu/core)

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-07-31 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-2:
-

Attachment: patch-le-polish

I updated flavio's patch for the new directory structure on apache.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish, patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-06-23 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Status: Patch Available  (was: Open)

Please review. -F

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-06-23 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: patch-le-polish

Have made logicalclock on AuthFastLeaderElection volatile as well.

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-06-23 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: (was: patch-le-polish)

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-2) Synchronization issues in QuorumPeer and FastLeader election

2008-06-12 Thread Flavio Paiva Junqueira (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Paiva Junqueira updated ZOOKEEPER-2:
---

Attachment: patch-le-polish

This is a tentative patch to fix the problems pointed out on QuorumPeer and 
FastLeaderElection.

1- Makes logicalclock volatile;
2- Creates accessor methods for currentVote and state, and enforce their use;
3- Accessor methods are synchronized.

-F

> Synchronization issues in QuorumPeer and FastLeader election
> 
>
> Key: ZOOKEEPER-2
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2
> Project: Zookeeper
>  Issue Type: Bug
>  Components: leaderElection
>Reporter: Benjamin Reed
>Assignee: Flavio Paiva Junqueira
> Attachments: patch-le-polish
>
>
> There are a couple of cases of member variables that need to be marked 
> volatile or surrounded in a synchronization block. A couple of examples are:
> * QuorumPeer state should be synchronous
> * currentVote in QuorumPeer is marked volatile, but when it's members are 
> often accessed individually as if they were in an atomic unit. Such code 
> should be changed to get a reference to the currentVote and they access 
> members through that reference.
> * It looks like logicalClock in FastLeaderElection should be volatile. It 
> should either be fixed or commented to explain why it doesn't need to be.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.