[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: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 23 Aug 2012 00:10:51 +0200

On Wed, Aug 22, 2012 at 9:39 PM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> 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.

Ok, let me try to decipher what that means for users.

- New commit will block: does this mean that 'svn commit -mm somefile'
will simply hang (until the repository is unfrozen, or until the
client-side timeout is reached)? Can it be cancelled?

- Commit in progress will block when trying to convert the transaction
into a revision: so the running 'svn commit -mm somefile' will hang at
the end (after transmitting file contents, but before the "Committed
Revision XXX" notification), until the repository is unfrozen, or
until the client-side timeout is reached, right? Can it be cancelled?
What happens if I cancel, or if the client-side timeout is reached
(will the repository still commit the transaction when it's unfrozen;
will my working copy still be ok)?

> 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.

Does that mean that a new 'svn commit -mm somefile' will error out? Or
will it hang until unfrozen or until client-side timeout?

Wouldn't we want the same behavior, at least for the end-user,
regardless of BDB or FSFS (or other backends)?

If all of this is not really decided yet, what is the intention? Is
this still under discussion? Shouldn't we decide on the desired
behavior before the feature is implemented?

Received on 2012-08-23 00:11:44 CEST

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