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

Two svnsync in parallel crash mirror repo.

From: Andreas Krüger, DV-RATIO <andreas.krueger_at_hp.com>
Date: Thu, 13 Jan 2011 19:17:09 +0000

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.


Here are the gory details of the second such problem,
which occurred today. We had a previous such problem some time
ago, but I was on Christmas vacation then and have not thoroughly
investigated that one.


A developer copied several project directory trees to the same tag,
in rapid succession.

The way I've set it up, each post-commit hook instance forks,
and then starts an svnsync. That is, the post-commit hook
completes and svnsync is run in the background.

On the mirror repository, this error appears in the log file
(all slightly edited for clarity):

  Could not MERGE
    resource "/reponame/!svn/act/... ..." into "/reponame". [409, #0]
  A conflict occurred during the MERGE processing.
    The problem occurred with the
    "/tags/targettag/Project_X" resource. [409, #160024]
  Conflict at '/tags/targettag/Project_X' [409, #160024]


I checked the revisions in the primary repository:

  Revision 80408 added /tags/targettag/Project_X
  
  Revision 80409 added /tags/targettag/Project_Y
  
  Revision 80410 added /tags/targettag/Project_Z
  
  Revision 80411 changed /branches, not /tags.


I also checked the mirror:

  Revision 80408 added /tags/targettag/Project_X
  
  Revision 80409 added /tags/targettag/Project_Y
  
  Revision 80410 deleted /tags/targettag/Project_Y
               and added /tags/targettag/Project_Y
  
  Revision 80411 added /tags/targettag/Project_Z

There is no revision 80412 in mirror.


All further svnsync attempts fail, complaining:

  svnsync: Revision being currently copied (80410),
    last merged revision (80409),
    and destination HEAD (80411)
    are inconsistent;
  have you committed to the destination without using svnsync?


This mirror runs on a somewhat old, slow box, and the network
connection between primary and mirror is slow, too.

Both primary and mirror are accessed by svnsync via https.

I'm currently rebuilding up the mirror from scratch.
(which gives me time to write this mail)...

So far the facts. My speculation on this:

I rule out foreign write-access on the mirror repository,
I have been bitten by an svnsync bug.

I understand that svnsync tries to do some sort of locking
through the rev properties of 0 of mirror.
I think that this locking failed on me.

So two svnsync processes both tried to push 80409 to mirror, and
messed up. (Maybe one was triggered by 80409, the other by 80410.)



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.

Regards,
and thanks to the team for providing fine software,

Andreas
--
Dr. Andreas Krüger, Senior Developer

Tel. (+49) (211) 280 69-1132
andreas.krueger_at_hp.com

DV-RATIO NORDWEST GmbH, Habsburgerstraße 12, 40547 Düsseldorf, Germany
 
für
 
Hewlett-Packard GmbH H Herrenberger Str. 140 71034 Böblingen www.hp.com/de
Geschäftsführer: Volker Smid (Vorsitzender), Michael Eberhardt, Thorsten Herrmann,
Martin Kinne, Heiko Meyer, Ernst Reichart, Rainer Sterk
Vorsitzender des Aufsichtsrates: Jörg Menno Harms
Sitz der Gesellschaft: Böblingen S Amtsgericht Stuttgart HRB 244081 WEEE-Reg.-Nr. DE 30409072
Received on 2011-01-13 20:18:49 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.