Options for parallelizing smart server (Was: Re: multiple users at the same time on one repo...)

John Arbash Meinel john at arbash-meinel.com
Wed Aug 30 19:34:52 BST 2006


Jan Hudec wrote:
> On Thu, Aug 24, 2006 at 01:53:38PM -0500, John Arbash Meinel wrote:

...

> Yes, that is the hard part. Basically the lock would have to look as
> normal lock, but have something special about it.
> 
> IIRC the lock is a directory containing a special file with the locker
> info, right? Than a shared lock could be the same directory with one
> extra subdirectory. Presence of this subdirectory would indicate a
> shareable lock.
> 
> Every client wanting to share the lock would create a uniquely named
> file in that directory (open with O_EXCL should be good enough).
> 
> Every client releasing the shared lock would remove it's file and try to
> remove the directory. If that fails, there are more users and this
> client is done. If it succeeds, this client is the last user and has to
> remove the lock. During the clean-up the lock is exclusive, so no other
> client can share it.

Good idea.

...

> The proposal with shared locking has the advantage that shared locks can
> be used in future over sftp (when openssh implements v6 protocol) and
> over webdav (apache dav module supports locks, but I am not sure they
> are compatible with fcntl locks -- but even if they are not, they could
> be made so one day).
> 

It is definitely an interesting proposal. And I think we should consider
it. Having the ability to do better work when more information is
available would be nice.

I'll file a feature spec about it.

John
=:->

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


More information about the bazaar mailing list