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

Re: can libsvn_fs handle parallel writes to the same txn?

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-05-22 20:25:53 CEST

On 5/22/06, Peter N. Lundblad <peter@famlundblad.se> wrote:
> Malcolm Rowe writes:
> > On Mon, May 22, 2006 at 08:24:08AM -0500, Ben Collins-Sussman wrote:
> > > over DAV opens up the possibility that multiple httpd processes might
> > > be attempting to write to the same fs transaction at the same time.
> > >
> >
> > >From what I can remember, it certainly looked to me like the FSFS code
> > requires that a transaction is only updated by a single thread.
> >
> > For example, when we receive a text-delta for a file, we just stream the
> > resulting delta to the end of the proto-rev-file (of which there is only
> > one per transaction), and that certainly won't work if two callers call
> > svn_fs_apply_textdelta() simultaneously on the same transaction root.
> >
> Yeah, and the same is true for the changes file, for example. I don't
> think concurrency is supported at all for a single transaction in
> FSFS.

Making things work concurrently might be complex, but at the very
least it seems like we should think about adding some locking... If
you're going to append to the prototype rev file you lock it (both
file based and a mutex if you're a multithreaded process, just like we
do for the repos lock), same for the changes file, etc.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 22 20:26:25 2006

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.