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

Re: packing race condition

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 5 Jan 2009 15:07:04 +0100

On Mon, Jan 05, 2009 at 07:31:38AM -0600, Hyrum K. Wright wrote:
> Hash: SHA1
> It doesn't use the write lock currently, but modifying it to do so would
> probably solve the problem. When I originally wrote packing, I intended it to
> be single-threaded, and if somebody attempted to run two instances in parallel,
> well, Don't Do That. Using the write lock won't let 'svnadmin pack' run any
> quicker, (i.e., the process isn't parallelized between two concurrent
> instances), but it would prevent the race condition Daniel describes.
> When we were chatting on IRC the other day, I wasn't sure if upgrade used the
> write lock, or a read-write lock (does FSFS even have such a thing?) and I
> didn't have time to check. If we can get away with using the write-lock, which
> I believe we can, it seems to be the most maintainable solution going forward.
> As an aside, I've been thinking that letting pack notify of progress would be
> useful, especially for the big repositories on which it was intended to run.
> Thoughts?

Just a quick thought:
If this is something people might end up running from cron,
then locking should definitely be used.


Received on 2009-01-05 15:07:40 CET

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