[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Conceptual locking procedure for database access [#11511]

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-12-23 17:51:43 CET

Oliver Klozoff wrote:

>>>>Like this:
>>>>
>>>> For every process ID slot {
>>>> if we dont' have a slot yet and the slot is empty {
>>>>
>>> -> We are preempted
>>>
>>But we stiil hold the exclusive lock on the whole file, and
>>without that, no other process can lock a process ID slot.
>>
>>Sorry, thought of that. :-)
>>
>>
>
>Oh, I see... Sorry, I looked at just your pseudocode, not realizing you were
>still including the 'master lock' from Keith's pseudocode.
>
>
I only changed part of that pseudocode, yes.

>Incidentally, this code:
>
> if the slot is still used {
> Recovery is needed
> Mark the slot empty
> }
> Release process lock slot
>
>should probably be:
> if the slot is still used {
> Recovery is needed
> }
> if we do not have a slot yet {
> mark the slot as ours
> we have a slot now
> } else {
> Release process lock slot
> }
>
>

Oh, I think this is a minor change. The implementation might well look
like that, but as far as I'm concerned, the pseudocode should describe
the semantics, not the actual implementation.

>While I'm here, I think I should note that fcntl locking works over NFS,
>while flock() locking (under Linux) does not. Since a lot of people have
>asked for Subversion support over NFS, that's a good thing :)
>
>
Forget it. BDB has other issues on NFS that this change doesn't even
address. Anyway, SVN does support NFS-mounted repositories now, using
FSFS instead of BDB.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 23 17:51:47 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.