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: http://mail-archives.apache.org/mod_mbox/subversion-dev/200911.mbox/%3c20091127115356.gc9...@jack.stsp.name%3E and filed: http://subversion.tigris.org/issues/show_bug.cgi?id=3546 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 package): #!/bin/sh LOCKFILE=/tmp/`basename ${0}`.lock lockfile -r 3 ${LOCKFILE} || exit 1 /usr/local/bin/svnsync sync file:///var/svn/repos rm -f ${LOCKFILE} Stefan