[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: David Glasser <glasser_at_davidglasser.net>
Date: Mon, 5 Jan 2009 12:38:39 -0800

FSFS has no read-write locks. It is a fundamental design goal of FSFS goal
that reads should never block; anything that changes that should have a very
very strong justification. (Not that you are here, AFAICT.)

--dave

On Jan 5, 2009 5:31 AM, "Hyrum K. Wright" <hyrum_wright_at_mail.utexas.edu>
wrote:

-----BEGIN PGP SIGNED MESSAGE-----
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?

- -Hyrum

David Glasser wrote: > You mean svnadmin pack doesn't just work within the
FSFS write lock? That > ...
>
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1004537

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkliC7kACgkQCwOubk4kUXzxuwCg2AMzpKrU00Gk3Dxd7YNqMy9M
ep4AoJ0HddavnWaeXtQtCleJhBO7uIyq
=+PGP
-----END PGP SIGNATURE-----

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1006002
Received on 2009-01-05 21:50:09 CET

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