lock-breaking ui

Martin Pool mbp at sourcefrog.net
Tue Feb 21 05:31:10 GMT 2006


On Tue, 2006-02-21 at 10:43 +1100, Robert Collins wrote:

> 'open file descriptor' is not something we can do except locally.

Nor are hardlinks, fwiw.

> > I think the unlocking race condition is potentially very dangerous. I
> > don't want a bogus client who was sitting on a lock to unlock me,
> > after
> > I've broken their control.
> 
> so the race is:
> client A locks
> client A starts to unlock and verifies it has the lock
> client B breaks
> client B locks
> client A unlocks

This is just one case of bad things that can happen if you remove a
supposedly stale lock while a client still thinks it has it.  Even aside
from the problem of that client removing someone else's lock, it can
still keep on modifying files while someone else is also doing so,
causing havoc.

Therefore perhaps we do just have to assume that you only break a lock
if you really are sure no one else holds it.  This is not perfect, but
only the same requirement as cvs and svn (and arch?)

-- 
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060221/5f8d544e/attachment.pgp 


More information about the bazaar mailing list