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

Re: Getting exclusive access to the repository

From: <philip_at_codematters.co.uk>
Date: 2003-01-23 18:51:05 CET

Ben Collins-Sussman sussman@collab.net writes:

  The best idea we came up with is copying the whole repository, doing the
  recover and then moving it back.

Be careful when copying repositories, a simple filesystem copy won't
always work, make sure you use the BDB hot backup procedure.

  Why isn't there a lock that can be taken to enforce this?
 
 There is a lock. But 'svnadmin recover' starts out destroying that
 lock on purpose (because some other process accessing the repos may
 have died), and then recreates it.

There is still a gap between the time the administrator verifys that
there are no processes accessing the database, and 'svnadmin recover'
taking the lock; during this gap another process could start. At
present some other mechanism is needed to close this gap, perhaps you
unplug the network cable. It would be better if one could a) lock the
database and prevent new conections, then b) wait for the
administrator to verify that there are no existing connections, and
finally c) run recover.

It's much harder to stop someone accessing the database directly, but
we should be able to stop those coming through svn_repos_open.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:09:40 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.