From users-return-17207-apmail-subversion-users-archive=subversion.apache.org@subversion.apache.org Sat Feb 9 10:31:38 2013 Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BF75EE69 for ; Sat, 9 Feb 2013 10:31:38 +0000 (UTC) Received: (qmail 64969 invoked by uid 500); 9 Feb 2013 10:31:37 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 64856 invoked by uid 500); 9 Feb 2013 10:31:36 -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 64841 invoked by uid 99); 9 Feb 2013 10:31:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Feb 2013 10:31:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [129.143.116.10] (HELO rhlx01.hs-esslingen.de) (129.143.116.10) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Feb 2013 10:31:28 +0000 Received: by rhlx01.hs-esslingen.de (Postfix, from userid 102) id A63E4A2C52; Sat, 9 Feb 2013 11:31:07 +0100 (CET) Date: Sat, 9 Feb 2013 11:31:07 +0100 From: Andreas Mohr To: Marius Gedminas , Andreas Krey , users@subversion.apache.org Subject: Re: Discrepancies in svn mirror created with svnsync Message-ID: <20130209103107.GA24564@rhlx01.hs-esslingen.de> References: <20130207210033.GA13503@platonas> <20130208104440.GU13329@inner.h.apk.li> <20130208134516.GA4194@platonas> <20130208144529.GD31514@ted.stsp.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130208144529.GD31514@ted.stsp.name> X-Priority: none User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Checked: Checked by ClamAV on apache.org 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. Note that directory creation/removal are the only FS mechanism which is guaranteed to be atomic, on UNIX (POSIX?) at least. Thus if lockfile isn't available/installable, as a manual mechanism you could fetch a tempfile name (obviously to be globally used by *all* svnsync script users!), and use that name to create a directory, run svnsync on success and then remove it. (or probably better use a static GUID value in the directory name) 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!). Andreas Mohr