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

Re: Discrepancies in svn mirror created with svnsync

From: Marius Gedminas <marius_at_gedmin.as>
Date: Tue, 12 Feb 2013 17:18:01 +0200

On Sat, Feb 09, 2013 at 11:31:07AM +0100, Andreas Mohr wrote:
> Hi,
>
> On Fri, Feb 08, 2013 at 03:45:29PM +0100, Stefan Sperling wrote:
> > I cannot tell you what happened here and why the revisions in the
> > mirro are empty. That sure is concerning.
> >
> > However there are known race conditions in svnsync in Subversion 1.6.
> > See http://subversion.apache.org/docs/release-notes/1.7.html#atomic-revprops
> >
> > So you should definitely wrap svnsync in a tool like lockfile (part of
> > procmail), or upgrade to 1.7.

I went with

  #!/bin/sh
  lockfile -r500 /stuff/zope-mirror/locks/ADHOC.lock || exit 1
  /usr/bin/sudo -u syncuser /usr/bin/svnsync sync file:///stuff/zope-mirror
  rm -f /stuff/zope-mirror/locks/ADHOC.lock

> Be careful about "solutions" other than lockfile - some of these appear to be
> terribly unsafe (some newer Ubuntu-introduced "atomic locking" package
> comes to mind - which then executes anyway after a measly timeout!).

Do you remember the name of the package?

Anyway, this takes care of prevention. What about recovery? Can I fix
the three missing revisions manually somehow? Or at least truncate my
mirror's history to that point so that I could run svnsync to get just
the last month and a half, instead of re-creating the mirror from
scratch?

Marius Gedminas

-- 
Your eyes are weary from staring at the CRT.  You feel sleepy.  Notice how
restful it is to watch the cursor blink.  Close your eyes.  The opinions
stated above are yours.  You cannot imagine why you ever felt otherwise.

Received on 2013-02-12 16:18:44 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.