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

Re: svn_fs/svn_repo repository lock API

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 22 Aug 2012 20:39:49 +0100

Johan Corveleyn <jcorvel_at_gmail.com> writes:

> On Fri, Aug 10, 2012 at 10:22 AM, Philip Martin
> <philip.martin_at_wandisco.com> wrote:
>> Johan Corveleyn <jcorvel_at_gmail.com> writes:
>>> So, say for a standard 1.8 FSFS repository, is there a timeout for
>>> commits? What's the timeout (is it configurable?)? How will the commit
>>> fail when it reaches the timeout?
>> I don't think there is a timeout for the main write-lock. There is a
>> 10s timeout for the rep-cache but rep-cache errors are non-fatal.
> So, while the repository is frozen, will a new commit fail immediately
> (with a clear error message)? Or will it hang (possibly indefinitely,
> in which case the client-side time-out will terminate things) until
> the repository is unfrozen?

Freeze takes the write-lock so things that require the write-lock will
block like all other blocks for the write-lock.

A new FSFS commit will block because it requires the write-lock to bump
the sequence number. Starting an FSFS freeze doesn't have to wait for
in-progress commits to finish. A FSFS commit in progress will be able to
continue modifying the transaction, as that doesn't require the
write-lock, but will block when it attempts to convert the transaction
into a revision.

I'm currently using BDB's svn_repos lock for the BDB freeze so that
makes a BDB repository completely unreadable while frozen. No BDB
commits can start while frozen. Starting a BDB freeze has to wait for
in-progress commits to finish.

Certified & Supported Apache Subversion Downloads:
Received on 2012-08-22 21:40:26 CEST

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