[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

2008-08-12 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-111:
---

Attachment: ZOOKEEPER-111.patch

same as last patch except I don't check for file delete success (see 
ZOOKEEPER-121) as it fails under windows (this is what flavio was seeing)

I'm still seeing some weirdness on windows (linux is fine) in QuorumTest, 
testHammer still sometimes fails for me on windows xp.

Flavio, please give this another try.


> significant cleanup of existing tests
> -
>
> Key: ZOOKEEPER-111
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-111
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: tests
>Reporter: Patrick Hunt
>Assignee: Patrick Hunt
> Attachments: TEST-org.apache.zookeeper.test.AsyncTest.txt, 
> ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 
> ZOOKEEPER-111.patch
>
>
> About to submit a patch that significantly cleans up existing tests.
> 1) removed the need for "sleep" calls in the tests, instead I monitor the 
> status of the server (using the client socket "stat" command) which provides 
> a barrier to the client test operations. I use this barrier both when 
> starting and ending the test.
> 2) also fixed a number of problems in the tests where the test itself was 
> broken.
> 3) general cleanup and some refactoring to make it easier to write new tests, 
> maintain old, and track down issues if the test does find a problem.

-- 
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] Commented: (ZOOKEEPER-119) Reserve ".zookeeper" node for server use.

2008-08-12 Thread Jakob Homan (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622019#action_12622019
 ] 

Jakob Homan commented on ZOOKEEPER-119:
---

Maybe it would work to create the concept of hidden files, ala Linux?  Hide the 
ones that start with dot by default so that all the getChildren calls don't 
have to have special code to ignore .zookeeper or others.  Then create an 
overloaded getChildren that returns all the hidden files?  Just a thought.

> Reserve ".zookeeper" node for server use.
> -
>
> Key: ZOOKEEPER-119
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-119
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Patrick Hunt
>Assignee: Benjamin Reed
>
> The server should not allow clients to create .zookeeper nodes in the node 
> hierarchy. These nodes should be reserved for zk future use, some ideas:
> * /.zookeeper/proc
> * /.zookeeper/stats
> * /.zookeeper/...
> * /.../.zookeeper/... (disallow both at root as well as child nodes)

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



[jira] Commented: (ZOOKEEPER-119) Reserve ".zookeeper" node for server use.

2008-08-12 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622018#action_12622018
 ] 

Patrick Hunt commented on ZOOKEEPER-119:


That's a good point though, if we have it in getChildren the results could be 
confusing... hrm. Hadn't thought through all the issues, at this point just 
wanted to reserve the node name so that we'd have it available later.


> Reserve ".zookeeper" node for server use.
> -
>
> Key: ZOOKEEPER-119
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-119
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Patrick Hunt
>Assignee: Benjamin Reed
>
> The server should not allow clients to create .zookeeper nodes in the node 
> hierarchy. These nodes should be reserved for zk future use, some ideas:
> * /.zookeeper/proc
> * /.zookeeper/stats
> * /.zookeeper/...
> * /.../.zookeeper/... (disallow both at root as well as child nodes)

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



[jira] Commented: (ZOOKEEPER-119) Reserve ".zookeeper" node for server use.

2008-08-12 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622013#action_12622013
 ] 

Patrick Hunt commented on ZOOKEEPER-119:


We wouldn't create a new API, a number of benefits in using the existing zk 
read/write operations.

I don't think we should hide it - .zookeeper/stats for example could be used to 
get useful information about the system/tree/node. I was thinking about 
something along the lines of linux proc filesystem. 

> Reserve ".zookeeper" node for server use.
> -
>
> Key: ZOOKEEPER-119
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-119
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Patrick Hunt
>Assignee: Benjamin Reed
>
> The server should not allow clients to create .zookeeper nodes in the node 
> hierarchy. These nodes should be reserved for zk future use, some ideas:
> * /.zookeeper/proc
> * /.zookeeper/stats
> * /.zookeeper/...
> * /.../.zookeeper/... (disallow both at root as well as child nodes)

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



[jira] Commented: (ZOOKEEPER-119) Reserve ".zookeeper" node for server use.

2008-08-12 Thread Jakob Homan (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622010#action_12622010
 ] 

Jakob Homan commented on ZOOKEEPER-119:
---

Would you also want these to be hidden from/removed from results presented to 
the getChildren() method, essentially hiding the /.zookeeper from normal client 
connections?  If so, would there then be separate APIs to see it, or would it 
be completely verboten for client connections?

> Reserve ".zookeeper" node for server use.
> -
>
> Key: ZOOKEEPER-119
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-119
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Patrick Hunt
>Assignee: Benjamin Reed
>
> The server should not allow clients to create .zookeeper nodes in the node 
> hierarchy. These nodes should be reserved for zk future use, some ideas:
> * /.zookeeper/proc
> * /.zookeeper/stats
> * /.zookeeper/...
> * /.../.zookeeper/... (disallow both at root as well as child nodes)

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



[jira] Created: (ZOOKEEPER-121) SyncRequestProcessor is not closing log stream during shutdown

2008-08-12 Thread Patrick Hunt (JIRA)
SyncRequestProcessor is not closing log stream during shutdown
--

 Key: ZOOKEEPER-121
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-121
 Project: Zookeeper
  Issue Type: Bug
  Components: server
Reporter: Patrick Hunt
Assignee: Benjamin Reed


The SyncRequestProcessor is not closing log stream during shutdown. 

See FIXMEs with this ID in ClientBase.java -- I've commented out the assertion 
for the time being (checking for logs being deleted), as part of this fix 
re-enable these asserts and also verify tests on a Windows system.


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



[jira] Created: (ZOOKEEPER-120) NIOServerCnxn needs to improve shutdown() handling

2008-08-12 Thread Patrick Hunt (JIRA)
NIOServerCnxn needs to improve shutdown() handling
--

 Key: ZOOKEEPER-120
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-120
 Project: Zookeeper
  Issue Type: Bug
  Components: server
Reporter: Patrick Hunt


When the NIOServerCnxn is shutdown it doesn't handle gracefully - if shutdown 
is called we should set internal state. In the run method we print unnecessary 
error messages as we don't currently know that shutdown (gracefully) was called 
rather than some other more serious, unexpected, condition.


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



[jira] Commented: (ZOOKEEPER-25) FUSE for ZooKeeper

2008-08-12 Thread Mahadev konar (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621874#action_12621874
 ] 

Mahadev konar commented on ZOOKEEPER-25:


the patch looks good. Some comments -- 

1) src/contrib/zkfuse/AUTHORS.txt
can we remove this file? Usually in apache authors tags are avoided since they 
are chanaged over and over by others and mentioning that the code belongs to 
someone becomes wrong to say. 

2) src/contrib/zkfuse/ChangeLog  

can we remove this file as well?  The changelog does not match any svn 
revisions on apache -- or any revisions that are open source... 

> FUSE for ZooKeeper
> --
>
> Key: ZOOKEEPER-25
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-25
> Project: Zookeeper
>  Issue Type: New Feature
>Reporter: Patrick Hunt
>Assignee: Patrick Hunt
> Attachments: configure.ac.patch, ZOOKEEPER-25.patch.gz
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1873981&group_id=209147&atid=1008547

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



[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

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

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621839#action_12621839
 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-111:
--

Now both SyncCallTest and WatcherFuncTest are failing on 
ClientBase.recursiveDelete. Here are the reported messages:

{noformat}
junit.framework.AssertionFailedError: delete
at 
org.apache.zookeeper.test.ClientBase.recursiveDelete(ClientBase.java:168)
at org.apache.zookeeper.test.ClientBase.tearDown(ClientBase.java:158)
at 
org.apache.zookeeper.test.WatcherFuncTest.tearDown(WatcherFuncTest.java:101)
{noformat}

> significant cleanup of existing tests
> -
>
> Key: ZOOKEEPER-111
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-111
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: tests
>Reporter: Patrick Hunt
>Assignee: Patrick Hunt
> Attachments: TEST-org.apache.zookeeper.test.AsyncTest.txt, 
> ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch
>
>
> About to submit a patch that significantly cleans up existing tests.
> 1) removed the need for "sleep" calls in the tests, instead I monitor the 
> status of the server (using the client socket "stat" command) which provides 
> a barrier to the client test operations. I use this barrier both when 
> starting and ending the test.
> 2) also fixed a number of problems in the tests where the test itself was 
> broken.
> 3) general cleanup and some refactoring to make it easier to write new tests, 
> maintain old, and track down issues if the test does find a problem.

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



Build failed in Hudson: ZooKeeper-trunk #51

2008-08-12 Thread Apache Hudson Server
See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/51/changes

--
[...truncated 20026 lines...]
[junit] 2008-08-12 10:51:49,674 - INFO  [main:[EMAIL PROTECTED] - Submitted 
all operations:Tue Aug 12 10:51:49 UTC 2008
[junit] 2008-08-12 10:51:49,840 - INFO  [main:[EMAIL PROTECTED] - Clent 
test shutdown
[junit] 2008-08-12 10:51:49,843 - ERROR [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - => Goodbye cruel world <==
[junit] 2008-08-12 10:51:49,844 - WARN  [SendThread:[EMAIL PROTECTED] - 
Closing: 
[junit] java.io.IOException: Read error rc = -1 
java.nio.DirectByteBuffer[pos=0 lim=4 cap=4]
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:491)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:718)
[junit] 2008-08-12 10:51:49,844 - INFO  [main:[EMAIL PROTECTED] - Client 
test shutdown finished
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 5.394 sec
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] 2008-08-12 10:51:50,324 - INFO  [main:[EMAIL PROTECTED] - Client 
test setup
[junit] 2008-08-12 10:51:55,397 - INFO  [main:[EMAIL PROTECTED] - Client 
test setup finished
[junit] 2008-08-12 10:51:55,414 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-08-12 10:51:55,415 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:64320 remote=/127.0.0.1:33221]
[junit] 2008-08-12 10:51:55,423 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:64320 lastZxid 0
[junit] 2008-08-12 10:51:55,426 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Creating new session 11bb68b0aec
[junit] 2008-08-12 10:51:55,452 - WARN  [SyncThread:[EMAIL PROTECTED] - 
Finished init of 11bb68b0aec: true
[junit] 2008-08-12 10:51:55,454 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-08-12 10:51:55,455 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:64321 remote=/127.0.0.1:33221]
[junit] 2008-08-12 10:51:55,455 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:64321 lastZxid 0
[junit] 2008-08-12 10:51:55,456 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Creating new session 11bb68b0aec0001
[junit] 2008-08-12 10:51:55,469 - WARN  [SyncThread:[EMAIL PROTECTED] - 
Finished init of 11bb68b0aec0001: true
[junit] 2008-08-12 10:51:55,570 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11bb68b0aec
[junit] 2008-08-12 10:51:55,579 - WARN  [SendThread:[EMAIL PROTECTED] - 
Closing: 
[junit] java.io.IOException: Read error rc = -1 
java.nio.DirectByteBuffer[pos=0 lim=4 cap=4]
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:491)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:718)
[junit] 2008-08-12 10:51:55,688 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11bb68b0aec0001
[junit] 2008-08-12 10:51:55,695 - WARN  [SendThread:[EMAIL PROTECTED] - 
Closing: 
[junit] java.io.IOException: Read error rc = -1 
java.nio.DirectByteBuffer[pos=0 lim=4 cap=4]
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:491)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:718)
[junit] 2008-08-12 10:51:57,387 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-08-12 10:51:57,388 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:64323 remote=/127.0.0.1:33221]
[junit] 2008-08-12 10:51:57,389 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:64323 lastZxid 10
[junit] 2008-08-12 10:51:57,389 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Finished init of 11bb68b0aec: false
[junit] 2008-08-12 10:51:57,390 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Renewing session 11bb68b0aec
[junit] 2008-08-12 10:51:57,390 - WARN  [SendThread:[EMAIL PROTECTED] - 
Closing: 
[junit] java.io.IOException: Session Expired
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.readConnectResult(ClientCnxn.java:414)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:499)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:718)
[junit] 2008-08-12 10:51:57,687 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-08-12 10:51:57,687 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.So