[jira] Commented: (ZOOKEEPER-104) KeptSet: a distributed data stucture backed by the children of a ZooKeeper node

2008-07-30 Thread Mahadev konar (JIRA)

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

Mahadev konar commented on ZOOKEEPER-104:
-

ben is right the interrupted exception is a tricky bit we should let it 
flow out... i think your client library should also let it flow to the keepset 
api level. does that make sense anthony?

> KeptSet: a distributed data stucture backed by the children of a ZooKeeper 
> node
> ---
>
> Key: ZOOKEEPER-104
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-104
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: java client
>Reporter: Anthony Urso
>Assignee: Anthony Urso
>Priority: Minor
> Attachments: ZOOKEEPER-104.patch, ZOOKEEPER-104.patch, 
> ZOOKEEPER-104.patch
>
>
> Here is an implementation of a ZooKeeper backed Java Set. It should be 
> generally useful.

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



[jira] Updated: (ZOOKEEPER-59) Synchronized block in NIOServerCnxn

2008-07-30 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-59:
--

Status: Open  (was: Patch Available)

Cancelling this patch due to test failure - the vm itself is crashing. Flavio, 
do the tests pass for you with this patch applied?

I'm seeing the following after applying this patch - the mainline/HEAD code is 
testing fine. This is ubuntu with java 1.6.0_06.

junit.run:
[junit] Running org.apache.zookeeper.server.DeserializationPerfTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 15.073 sec
[junit] Running org.apache.zookeeper.server.SerializationPerfTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 12.307 sec
[junit] Running org.apache.zookeeper.server.ZooKeeperServerTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.141 sec
[junit] Running org.apache.zookeeper.test.AsyncTest
[junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 108.481 sec
[junit] Test org.apache.zookeeper.test.AsyncTest FAILED
[junit] Running org.apache.zookeeper.test.ClientTest
[junit] Running org.apache.zookeeper.test.ClientTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test org.apache.zookeeper.test.ClientTest FAILED (crashed)
[junit] Running org.apache.zookeeper.test.DataTreeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
[junit] Running org.apache.zookeeper.test.OOMTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.022 sec
[junit] Running org.apache.zookeeper.test.QuorumTest
[junit] Tests run: 5, Failures: 5, Errors: 0, Time elapsed: 201.057 sec
[junit] Test org.apache.zookeeper.test.QuorumTest FAILED
[junit] Running org.apache.zookeeper.test.RecoveryTest
[junit] Running org.apache.zookeeper.test.RecoveryTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test org.apache.zookeeper.test.RecoveryTest FAILED (crashed)
[junit] Running org.apache.zookeeper.test.SessionTest
[junit] Running org.apache.zookeeper.test.SessionTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test org.apache.zookeeper.test.SessionTest FAILED (crashed)
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test org.apache.zookeeper.test.WatcherFuncTest FAILED (crashed)

BUILD FAILED
/home/phunt/dev/Workspaces/gitzk/build.xml:370: Tests failed!


> Synchronized block in NIOServerCnxn
> ---
>
> Key: ZOOKEEPER-59
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-59
> Project: Zookeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Flavio Paiva Junqueira
>Assignee: Flavio Paiva Junqueira
> Attachments: ZOOKEEPER-59.patch
>
>
> There are two synchronized blocks locking on different objects, and to me 
> they should be guarded by the same object. Here are the parts of the code I'm 
> talking about:
> {noformat}
> [EMAIL PROTECTED]
> ...
>   synchronized (this) {
> outstandingRequests++;
> // check throttling
> if (zk.getInProcess() > factory.outstandingLimit) {
> disableRecv();
> // following lines should not be needed since we are 
> already
> // reading
> // } else {
> // enableRecv();
> }
> } 
> {noformat}
> {noformat}
> [EMAIL PROTECTED]
> ...
>  synchronized (this.factory) {
> outstandingRequests--;
> // check throttling
> if (zk.getInProcess() < factory.outstandingLimit
> || outstandingRequests < 1) {
> sk.selector().wakeup();
> enableRecv();
> }
> }
> {noformat}
> I think the second one is correct, and the first synchronized block should be 
> guarded by "this.factory". 
> This could be related to issue ZOOKEEPER-57, but I have no concrete 
> indication that this is the case so far.

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



[jira] Assigned: (ZOOKEEPER-59) Synchronized block in NIOServerCnxn

2008-07-30 Thread Patrick Hunt (JIRA)

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

Patrick Hunt reassigned ZOOKEEPER-59:
-

Assignee: Flavio Paiva Junqueira  (was: Mahadev konar)

> Synchronized block in NIOServerCnxn
> ---
>
> Key: ZOOKEEPER-59
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-59
> Project: Zookeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Flavio Paiva Junqueira
>Assignee: Flavio Paiva Junqueira
> Attachments: ZOOKEEPER-59.patch
>
>
> There are two synchronized blocks locking on different objects, and to me 
> they should be guarded by the same object. Here are the parts of the code I'm 
> talking about:
> {noformat}
> [EMAIL PROTECTED]
> ...
>   synchronized (this) {
> outstandingRequests++;
> // check throttling
> if (zk.getInProcess() > factory.outstandingLimit) {
> disableRecv();
> // following lines should not be needed since we are 
> already
> // reading
> // } else {
> // enableRecv();
> }
> } 
> {noformat}
> {noformat}
> [EMAIL PROTECTED]
> ...
>  synchronized (this.factory) {
> outstandingRequests--;
> // check throttling
> if (zk.getInProcess() < factory.outstandingLimit
> || outstandingRequests < 1) {
> sk.selector().wakeup();
> enableRecv();
> }
> }
> {noformat}
> I think the second one is correct, and the first synchronized block should be 
> guarded by "this.factory". 
> This could be related to issue ZOOKEEPER-57, but I have no concrete 
> indication that this is the case so far.

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



ZooKeeper test harness needs work

2008-07-30 Thread Patrick Hunt
I'm soliciting ideas on how to improve the reliability and usability 
(creating new tests in particular) of our current test harness.


Hudson and some users are seeing intermittent failures, primarily due to 
timing related issue in test setup; the test starts a server, runs some 
tests, then shuts down the server, loop to the next test. There is some 
code in ClientBase that's supposed to provide a latch for the server 
startup, but we also have a number of "sleeps" in the test setup, 
without which the tests fail more frequently (so something is still 
busted). In particular I want to make it easier to write server tests 
and to remove the need for sleeps as this causes the unit tests to run 
slowly.


Additionally we are seeing a need to tests clients in addition to the 
server (much of our current testing is related to verifying the correct 
function of the zk server). In this case we are not currently able to 
test any client failure handling cases (such as disconnect handling) as 
we are running against a fully functional zk server.


I'm thinking we should do two things:

1) create a better test harness for the server
2) implement a mock ZooKeeper.java that has similar semantics as zk 
server proper but has the capability to inject/reproduce/verify various 
error scenarios for client testing.


If you have any ideas/suggestions/comments/etc.. or would like to work 
on/with please let me know.


Patrick


[jira] Commented: (ZOOKEEPER-104) KeptSet: a distributed data stucture backed by the children of a ZooKeeper node

2008-07-30 Thread Benjamin Reed (JIRA)

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

Benjamin Reed commented on ZOOKEEPER-104:
-

InterruptedException is something we have to deal with from Java. We can't just 
catch them and retry. It is generally unsafe to eat this exception since it 
usually means someone wants the thread to go away. There seem to be a couple of 
ways to deal with InterruptedException but the safest seems to be to let it go 
through.

> KeptSet: a distributed data stucture backed by the children of a ZooKeeper 
> node
> ---
>
> Key: ZOOKEEPER-104
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-104
> Project: Zookeeper
>  Issue Type: New Feature
>  Components: java client
>Reporter: Anthony Urso
>Assignee: Anthony Urso
>Priority: Minor
> Attachments: ZOOKEEPER-104.patch, ZOOKEEPER-104.patch, 
> ZOOKEEPER-104.patch
>
>
> Here is an implementation of a ZooKeeper backed Java Set. It should be 
> generally useful.

-- 
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 #38

2008-07-30 Thread Apache Hudson Server
See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/38/changes

--
[...truncated 24095 lines...]
[junit] 2008-07-30 10:41:45,892 - WARN  [SyncThread:[EMAIL PROTECTED] - 
Finished init of 11b738f11d20001: true
[junit] 2008-07-30 10:41:45,995 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11b738f11d2
[junit] 2008-07-30 10:41:46,010 - 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-07-30 10:41:46,120 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11b738f11d20001
[junit] 2008-07-30 10:41:46,129 - 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-07-30 10:41:47,419 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-07-30 10:41:47,419 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:46533 remote=/127.0.0.1:33221]
[junit] 2008-07-30 10:41:47,420 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:46533 lastZxid 10
[junit] 2008-07-30 10:41:47,421 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Finished init of 11b738f11d2: false
[junit] 2008-07-30 10:41:47,421 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Renewing session 11b738f11d2
[junit] 2008-07-30 10:41:47,422 - 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-07-30 10:41:51,249 - INFO  [main:[EMAIL PROTECTED] - Clent 
test shutdown
[junit] 2008-07-30 10:41:51,251 - ERROR [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - => Goodbye cruel world <==
[junit] 2008-07-30 10:41:51,252 - INFO  [main:[EMAIL PROTECTED] - Client 
test shutdown finished
[junit] 2008-07-30 10:41:51,255 - INFO  [main:[EMAIL PROTECTED] - Client 
test setup
[junit] 2008-07-30 10:41:56,268 - INFO  [main:[EMAIL PROTECTED] - Client 
test setup finished
[junit] 2008-07-30 10:41:56,270 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-07-30 10:41:56,271 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:46551 remote=/127.0.0.1:33221]
[junit] 2008-07-30 10:41:56,281 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:46551 lastZxid 0
[junit] 2008-07-30 10:41:56,281 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Creating new session 11b738f3a98
[junit] 2008-07-30 10:41:56,291 - WARN  [SyncThread:[EMAIL PROTECTED] - 
Finished init of 11b738f3a98: true
[junit] 2008-07-30 10:41:56,330 - INFO  [SendThread:[EMAIL PROTECTED] - 
Attempting connection to server /127.0.0.1:33221
[junit] 2008-07-30 10:41:56,330 - INFO  [SendThread:[EMAIL PROTECTED] - 
Priming connection to java.nio.channels.SocketChannel[connected 
local=/127.0.0.1:46552 remote=/127.0.0.1:33221]
[junit] 2008-07-30 10:41:56,331 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Connected to /127.0.0.1:46552 lastZxid 0
[junit] 2008-07-30 10:41:56,332 - WARN  [NIOServerCxn.Factory:[EMAIL 
PROTECTED] - Creating new session 11b738f3a980001
[junit] 2008-07-30 10:41:56,345 - WARN  [SyncThread:[EMAIL PROTECTED] - 
Finished init of 11b738f3a980001: true
[junit] 2008-07-30 10:41:56,421 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11b738f3a98
[junit] 2008-07-30 10:41:56,429 - 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-07-30 10:41:56,545 - INFO  [ProcessThread:[EMAIL PROTECTED] - 
Processed session termination request for id: 11b738f3a980001
[junit] 2008-07-30 10:41:56,554 - WARN  [SendThread:[EMAIL PROTECTED] - 
Closing: 
[junit] java.io