Return-Path: Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: (qmail 56979 invoked from network); 13 Jan 2011 19:27:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 19:27:11 -0000 Received: (qmail 53808 invoked by uid 500); 13 Jan 2011 19:27:11 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 53765 invoked by uid 500); 13 Jan 2011 19:27:10 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 53758 invoked by uid 99); 13 Jan 2011 19:27:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 19:27:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.109.42.8] (HELO einhorn.in-berlin.de) (192.109.42.8) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 19:27:02 +0000 X-Envelope-From: stsp@stsp.name Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id p0DJQbn2013964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 13 Jan 2011 20:26:37 +0100 Received: from ted.stsp.name (stsp@localhost [127.0.0.1]) by ted.stsp.name (8.14.3/8.14.3) with ESMTP id p0DJQbBM017803; Thu, 13 Jan 2011 20:26:37 +0100 (CET) Received: (from stsp@localhost) by ted.stsp.name (8.14.3/8.14.3/Submit) id p0DJQbZY016178; Thu, 13 Jan 2011 20:26:37 +0100 (CET) Date: Thu, 13 Jan 2011 20:26:37 +0100 From: Stefan Sperling To: =?iso-8859-1?Q?krueger=2C_Andreas_=28Andreas_Kr=FCger=2C_DV-RATIO=29?= Cc: "users@subversion.apache.org" Subject: Re: Two svnsync in parallel crash mirror repo. Message-ID: <20110113192637.GB9996@ted.stsp.name> Mail-Followup-To: =?iso-8859-1?Q?krueger=2C_Andreas_=28Andreas_Kr=FCger=2C?= =?iso-8859-1?Q?_DV-RATIO=29?= , "users@subversion.apache.org" References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Virus-Checked: Checked by ClamAV on apache.org 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