zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Junqueira <fpjunque...@yahoo.com.INVALID>
Subject Re: Bug with ZKWriteLock recipe
Date Wed, 25 Feb 2015 21:34:23 GMT
Hi Edward,

Do you know if this is related to the issue described in ZK-645? If you have time, perhaps
contribute a patch either for that issue including your fix or a separate issue only for your
fix. 

Let me also add that the curator recipes are probably more robust at this point.

Thanks,
-Flavio


> On 25 Feb 2015, at 21:22, Edward Capriolo <edward.capriolo@huffingtonpost.com>
wrote:
> 
> Just for reference I fixed my fork to handle the above problem:
> 
> A new things tends to crop of less frequently:
> 2015-02-25 20:01:49 WARN  WriteLock:240 - Could not find the stats for less
> than me: /teknek/locks/tocassandra/x-237496960065273856-0002061880
> 
> The lock recipe seems unable to recover from this case as well. buyer beware
> 
> 
> 
> On Fri, Jan 30, 2015 at 3:28 PM, Edward Capriolo <
> edward.capriolo@huffingtonpost.com> wrote:
> 
>> 
>> http://svn.apache.org/repos/asf/zookeeper/trunk/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/
>> 
>> So there is a bug in the above code ( I think)
>> 
>> WARN 10:08:31,468 attempting to unlock x-93233511378059273-0000000002
>> DEBUG 10:08:31,468 234f44a4-7f6e-4f19-962b-fb9a7b64f6c4 released
>> WARN 10:08:31,469 Unable to unlock/cleanup. hadlock?false
>> java.lang.IllegalArgumentException: Path must start with / character
>> at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:51)
>> at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:846)
>> at
>> org.apache.zookeeper.recipes.lock.WriteLock$1.execute(WriteLock.java:120)
>> at org.apache.zookeeper.recipes.lock.WriteLock.unlock(WriteLock.java:124)
>> at io.teknek.daemon.TeknekDaemon.considerStarting(TeknekDaemon.java:277)
>> at io.teknek.daemon.TeknekDaemon.access$4(TeknekDaemon.java:211)
>> at io.teknek.daemon.TeknekDaemon$2.run(TeknekDaemon.java:126)
>> 
>> The bug seems to be if the latch is not acquired unlock gets the from path.
>> 
>> 
>> https://github.com/edwardcapriolo/teknek-core/commit/747174f7b04a570e13583542a9e7ef3029f7bcf6
>> 
>> Basically with two concurrent users of the lock you see this quite often.
>> 
>> Q.Theses lock recipes seem a bit crude...no offense... I can send a patch.
>> But I wonder if no one is maintaining these maybe they should be removed
>> (and curator recipes) suggested instead.
>> 
>> 


Mime
View raw message