zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edward.capri...@huffingtonpost.com>
Subject Re: Bug with ZKWriteLock recipe
Date Wed, 25 Feb 2015 21:22:58 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message