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

Re: [PATCH] lock transaction-current separately from current

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-11-09 03:06:12 CET

On Oct 8, 2007 12:18 AM, Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:
> Currently, we do:
> open write-lock
> lock write-lock
> open transaction-current
> read
> close
> open temporary
> write
> fflush
> close
> rename to transaction-current
> open directory
> fflush directory
> close
> unlock write-lock
> close write-lock
>
> We could switch the lockfile to a new transaction-current-lock, sure,
> though it'd be much better if we switched to:
>
> open transaction-current
> lock
> read
> seek
> write
> fflush
> close

Hmm. Are you sure this is safe? What if the server crashed while
halfway through writing out the line? (Or between the trunc that I
suspect would be necessary there and the write?) Sure, in practice
buffering is going to make the former case impossible, but is it
really OK?

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 9 03:06:27 2007

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.