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

Re: lock on whole repository

From: Mark K <mark_at_mitsein.net>
Date: Sun, 10 Aug 2008 09:57:30 -0500

On Tue, 05 Aug 2008 17:37:04 -0400
Karl Fogel <kfogel_at_red-bean.com> wrote:

> Mark K <mark_at_mitsein.net> writes:
> > when using svnadmin upgrade, I see a message about svnadmin locking
> > the repository. From what I can tell in the code, all that happens
> > is that svnadmin upgrade implies --wait. Is there actually some
> > sort of locking involved?
>
> I'm not sure, but maybe it just means you can't commit while the
> upgrade is under way? What happens if you try operations against a
> repository while it's being upgraded?
>

I haven't tried it because an upgrade takes such a short amount of
time :). Digging more into the code, I think there is some sort of
fcntl lock through APR on the write-lock file that acts as a marker
that a transaction is underway.

The main reason that I was looking for an answer to this is that I
wrote my own verison of fsfs-reshard since fsfs-reshard.py is marked as
not fit for production. I wrote one in perl that doesn't attempt to
handle as many cases as the original fsfs-reshard.py does but I wanted
to add some sort of locking mechanism to it.

At any rate, I did my upgrade last week and just ran svnadmin
upgrade /svn/repos && fsfs-reshard.pl /svn/repos on all of my
repositories and crossed my fingers :). Nothing went wrong, but it
would be nice to improve the script with some locking.

-- 
Mark K
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-10 16:58:17 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.