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

2008-07-26 Thread Flavio Paiva Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12617180#action_12617180
 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-104:
--

I agree, nice idea. I took a look at the patch, and I have a comment. 

You might consider throwing KeeperException on KeptSet.add to avoid problems, 
for example, with addAll. On addAll, if you try to add a number of elements, 
the first succeeds, but some other succeeding element fails, then addAll will 
end up returning true, although not all elements have been written. You can 
change the logic so that it returns false, but in general I think it is a good 
idea to expose to the application that there was a problem with ZooKeeper.  

Just to make sure that I have understood correctly your abstraction, the idea 
is to let ZooKeeper store the elements of a set despite failures of the client 
that created these elements, and that's why you create regular nodes and not 
ephemeral nodes. 

Finally, I don't see a contrib folder in the svn, so I suspect that we don't 
have one yet. I'm mentioning this because your patch should add KeptSet to 
contrib. Pat can either agree or correct me on this part. 

 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
Priority: Minor
 Attachments: 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] Commented: (ZOOKEEPER-104) KeptSet: a distributed data stucture backed by the children of a ZooKeeper node

2008-07-26 Thread Flavio Paiva Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12617186#action_12617186
 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-104:
--

Again on KeptSet.add, it seems to me that you can shrink your synchronized 
block. The only access to this.set is on the predicate of the if statement, 
and the call to create doesn't realy need to be synchronized, right? 

 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
Priority: Minor
 Attachments: 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.