You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Tyler MacDonald (JIRA)" <ji...@apache.org> on 2011/09/20 21:40:12 UTC

[jira] [Updated] (ZOOKEEPER-767) Submitting Demo/Recipe Shared / Exclusive Lock Code

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

Tyler MacDonald updated ZOOKEEPER-767:
--------------------------------------

    Attachment: ZOOKEEPER-767.patch

Hi,
   There was a bug in the exclusive lock code that guaranteed that only the first locker would obtain the lock (any future lockers would wait in line forever). This is because one of the loops was in the wrong spot, and we were not resetting our state before checking if there was another lock. (So the first time through, we see there is another lock, and we assume that forever.)

   I've updated the patch to fix this bug.


> 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