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

Sam Baskinger commented on ZOOKEEPER-767:
-----------------------------------------

Hi Tyler,

Thanks for looking at the code!

If I may be critical, it appears you created the problem of not reseting 
{{lockId = -1L}} by moving the lock checks outside of the for-loop that 
iterates over all existing children in ascending order (no new children should 
appear that have an ID below the one we established in {{exclusiveLockId}}.

Other than that, it appears that the patch you submitted looks good! I just 
want to understand if there was really a defect or if this is perhaps a more 
efficient way of implementing the same functionality.

Thanks again!

Sam

> Submitting Demo/Recipe Shared / Exclusive Lock Code
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-767
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-767
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: recipes
>    Affects Versions: 3.3.0
>            Reporter: Sam Baskinger
>            Assignee: Sam Baskinger
>            Priority: Minor
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-767.patch, ZOOKEEPER-767.patch, 
> ZOOKEEPER-767.patch, ZOOKEEPER-767.patch, ZOOKEEPER-767.patch, 
> ZOOKEEPER-767.patch
>
>          Time Spent: 8h
>
> Networked Insights would like to share-back some code for shared/exclusive 
> locking that we are using in our labs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to