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

Re: Two svnsync in parallel crash mirror repo.

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 13 Jan 2011 20:26:37 +0100

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.GC9302@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
Received on 2011-01-13 20:27:21 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.