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

Re: sync bug -> corrupted proxy repo

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 15 Jan 2010 12:28:53 +0100

On Fri, Jan 15, 2010 at 12:08 PM, Jon Foster <Jon.Foster_at_cabot.co.uk> wrote:
> Hi,
>
> Ryan Schmidt wrote:
>> But Subversion blocks the commit until the post-commit is done.
>
> That particular SVN client will be blocked.  But if you have
> two users committing at the same time, or if a user runs "svn"
> twice in parallel, then the post-commit hook will be run in
> parallel.
>
> Here's how I tested this.  I created a new repository with
> a post-commit hook that takes 30 seconds to run.  I then
> checked that it works, and that a normal commit took 30
> seconds.  I then did two commits in parallel, and that took
> 30 seconds.  This shows that the post-commit hook is
> running in parallel - if it had been run in series, then
> it would have taken 60 seconds for 2 commits.  (I also
> checked the output of "ps" and observed the two
> "post-commit" processes running).

Also, I'm pretty sure that, while the post-commit hook is running for
a particular commit, the commit itself is already visible to other
users. So, as you would expect from the name "*post*-commit hook", the
commit itself is already finalized before the post-commit hook starts
running. Otherwise, people wouldn't be able to do things like
automatically updating a working copy on the server, from within their
post-commit hook. The only thing that has to wait on the post-commit
hook is that particular svn client that's running the commit (as Jon
pointed out).

Regards,
Johan
Received on 2010-01-15 12:29:29 CET

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.