other forms of LockDir: changing instantiation
Aaron Bentley
aaron.bentley at utoronto.ca
Sat Oct 28 00:42:51 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Scott Parish wrote:
> I'm working on a new transport for use with bzr (amazon's s3) which
> doesn't have an atomic rename--i'm going to have to make a new
> implementation of LockDir. Unfortunately there's no good way to
> plug-in new versions of LockDir.
In my understanding, LockDir doesn't require atomic rename. It works on
Windows, after all.
There's a reason why we use the use the same form of locking on every
dumb transport, even when faster alternatives are available: a given
directory may be provided over multiple transports. And if two locking
regimes are in use, two locks can be taken at the same time.
> Right now LockDir is instantiated like:
>
> lockdir.LockDir(transport, name, file_modebits=, dir_modebits=)
>
> My proposal is to change this to:
>
> transport.get_lockdir(name, file_modebits=, dir_modebits=)
If you are certain you can't implement lockdir locking on s3, then I
think you need to implement a new bzrdir format. That way, downlevel
clients cannot accidentally access files using the wron locking regime.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFQpl60F+nu1YWqI0RAij6AJ95zVn6K6/PVy6dwDvrNYZWPadASgCfSd+d
bCVR7PfiYrAPc4WxH4r0s88=
=A5a1
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list