subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <>
Subject Re: Two svnsync in parallel crash mirror repo.
Date Thu, 13 Jan 2011 19:26:37 GMT
On Thu, Jan 13, 2011 at 07:17:09PM +0000, krueger, Andreas (Andreas Kr├╝ger, DV-RATIO) wrote:
> Hello, fellow SVN users,
> I think I have been bitten by two svnsync writing
> to the same mirror repo in parallel, causing it to become unusable
> for its intended purpose.

> I am contemplating to introduce some locking to primary's post-commit
> hook, so that only one svnsync will be pushing things to mirror at any
> one time.
> I'm also contemplating raising a bug report for this problem, if I'm
> allowed to.

Already found:
and filed:

A fix for this problem will be released in Subversion 1.7.

The workaround with 1.6 is to run svnsync processes on the same machine,
and synchronize them via tools like lockfile(1) (from the procmail

	LOCKFILE=/tmp/`basename ${0}`.lock

	lockfile -r 3 ${LOCKFILE} || exit 1
	/usr/local/bin/svnsync sync file:///var/svn/repos
	rm -f ${LOCKFILE}


View raw message