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

RE: SVN "Relay"

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Mon, 2 Aug 2010 13:40:38 +0100

> And if you decide to use svnsync for mirroring, note that the
> way the book describes the mirroring setup is vulnerable to a
> race condition.
> Make sure to read this issue:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3546
> To avoid the problem described in issue #3546, you should
> make the mirror repository pull changes from the master via a
> cronjob, and synchronise svnsync jobs using a file lock on
> the computer hosting the mirror repository.
> Only one svnsync job must be writing to the mirror repository
> at a time, or you risk breaking sync jobs. So do not push
> revisions from the master to the mirror via the post-commit
> hook (which is what the book suggests).
> Something like the following should work from a crontab on
> Linux systems:
> 0 * * * * flock -w 60 /tmp/svnsync.lock svnsync sync
> file:///path/to/repository/mirror
>
> We're working on fixing this problem such that the way the
> book describes it will work without a race condition, but
> that work is not yet complete.

A bit OT, I just want to check that this (the race condition) does not apply to two svnsync processes trying to sync two different repositories.

I use svnsync to keep our DR server up-to-date. We have very few people committing to the various repositories so it's more likely (and still it's not that likely) that two people commit to two different repositories than to the same one, so I just wanted to check thise scenario with you.

Giulio

Linedata Limited
Registered Office: 85 Gracechurch St., London, EC3V 0AA
Registered in England and Wales No 3475006 VAT Reg No 710 3140 03
Received on 2010-08-02 14:41:20 CEST

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.