other forms of LockDir: changing instantiation

Scott Parish srp at srparish.net
Sat Oct 28 01:42:08 BST 2006


On Fri, Oct 27, 2006 at 06:21:57PM -0500, John Arbash Meinel wrote:

> What specifically does/doesn't work for Amazon's S3?

With s3 there are no atomic operations.

For lockdir on s3 i was thinking about using a two phase lock. Basically
that would look something like:

  mkdir -p lock_dir

  put lock_dir/random-1
  if size(ls lock_dir) != 1 or lock_dir/random-1.read != nunce
     raise FailedToGetLock

  put lock_dir/random-2
  if size(ls lock_dir) != 2 or lock_dir/random-2.read != nunce
     raise FailedToGetLock

  success
   

sRp






More information about the bazaar mailing list