[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: Oliver Klozoff <stevieoh_at_fastmail.fm>
Date: 2004-12-23 17:32:27 CET

> >>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.

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
                }

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 :)

---------------------------------------------------------------------
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:33:35 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.