zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jzimmer...@netflix.com>
Subject Lock recipes and the lock path
Date Tue, 20 Sep 2011 19:37:51 GMT
When writing the lock recipes for ZK, there is the potential for path
garbage to build up. For example, imagine you are writing a lock for some
kind go member ID. You'd have a base path for the locks (say
"/locks/members") and then append the member ID to get locks on it. Thus,
you'd end up with "/locks/members" building up paths, one for each member

How can you safely clean up the path for each member ID lock? There
doesn't seem to be an atomic way to do it. If one process is cleaning up
for example "/locks/members/12345", it can't be sure than another process
might need to get a lock on that member ID. I.e. There's never a safe
point to delete "/locals/members/12345".


View raw message