transport lock methods

John A Meinel john at arbash-meinel.com
Fri Feb 17 16:48:36 GMT 2006


Wouter van Heyst wrote:
> On Fri, Feb 17, 2006 at 03:24:52PM +1100, Robert Collins wrote:
>> On Thu, 2006-02-16 at 20:29 -0600, John A Meinel wrote:
>>> Robert Collins wrote:
>>>> I think we should remove the lock methods from transport because having
>>>> transport specific locks leads to bugs : we dont have cross-transport
>>>> compatibility.
>>>>
>>>> I think we should do this for 0.8. Thoughts?
>>>>
>>>> Rob
>>>>
>>> I think we should move to LockDir for 0.8, which would get rid of
>>> transport specific locks. We only had transport specific locks because
>>> we *couldn't* have OS locks over sftp.
>> Yes, but we need to keep enough machinery around to write to format 6
>> branches over sftp unless we want to make 0.8 a watershed upgrade.
> 
> So where/how would format 6 over sftp locking be done?
> +1 on using the same locking scheme over all transports
> -1 on releasing 0.8 without that.
> 

I'm trying to determine if we need to remain compatible with older
versions of bzr for older branch formats.
For newer formats, I think we just need to switch to the LockDir
functionality, and use it across the board.

I suppose we could switch to O_EXCL across the board for older branch
formats (since this is the minimum allowable across SFTP, as we can't
get an OS lock). (And yes, there is stuff about NFS v2 and v3....)

Anyway, I can sort-of agree that someone isn't likely to be using 2
versions of bzr on the same machine. Which means that we can change how
we create local locks. We can't change how we do SFTP locks, since those
are very likely to be shared across developers.

So I'm okay with switching to always using O_EXCL for branch formats
5,6. I'm not 100% because of compatibility with bzr-0.7 (think NFS
shared branches, which will be locked with an OS level lock by bzr-0.7
and a O_EXCL lock with bzr-0.8 == corruption).

metadir-1 format branches will definitely switch to using LockDir across
the board. But how do we handle compatibility?

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060217/374ba0cd/attachment.pgp 


More information about the bazaar mailing list