[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: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Thu, 14 Jan 2010 16:04:20 -0600

On Jan 14, 2010, at 09:06, Johan Corveleyn wrote:

>> Is it not the case that a svn commit cannot start before the post-commit hooks has finished? I am asking becuase I will be implementing a DR system using svnsync, but I am not planning to let the post-commit finish before svnsync has finished (I don't care if it takes a bit longer, I can cope with that and with my users).
>
> No, that's definitely not the case. Both pre-commit and post-commit
> hooks can run simultaneously for multiple commits in parallel.
> Otherwise, a pre/post-commit hook could end up being a big bottleneck.
>
> As a practical example: if your pre-commit hook does validation of
> properties (e.g. making sure svn:eol-style is set correctly on the
> right types of files), then for a commit with a lot of files it may be
> running for multiple seconds (even minutes). In the meantime, other
> commits can be made without problems, without being bothered by that
> one commit which takes a long time to pass through pre-commit hook. I
> saw this in action myself with such a pre-commit hook, after I added
> some debug logging at the start and the end of the hook.

pre-commit hook, I believe you're right. But Subversion blocks the commit until the post-commit is done. Only one post-commit hook will run at a time. Unless you tell it to allow simultaneous runs, by redirecting the hook's stdout and stderr someplace.
Received on 2010-01-14 23:05:00 CET

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