You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Luc Claes <lu...@contactoffice.com> on 2011/02/24 17:27:45 UTC
WriteLocks and sessions [beginner]
Hi,
Could someone please explain me why WriteLocks, in the 'recipes'
package, seems to be restricted to one WriteLock instance (with a given
id) per ZooKeeper session ? As a Zookeeper session could be used by
multiple threads simultaneously (right ?), why couldn't we use multiple
accesses to the same lock in the same session ?
By looking at zookeeper-78 I only see that we need an extra id to avoid
some side-effects. Sessions Id are used as a prefix. Is this right ?
Shouldn't we use a session id + thread id or something like that ?
Thanks,
Luc