>
Linedata Services (UK) Ltd Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB Registered in England and Wales No 3027851 VAT Reg No 778499447 -----Original Message----- > From: Jon Foster [mailto:jon.fos...@cabot.co.uk] > Sent: 13 January 2010 13:13 > To: Andersen, Krista; users@subversion.apache.org > Cc: ssi-svn_admin > Subject: RE: sync bug -> corrupted proxy repo > > Hi, > > Andersen, Krista [mailto:krista.ander...@itg.com] wrote: > > Twice I have seen one of my proxy repositories become > corrupted due to > > an apparent bug in the svnsync sync process. Has anyone else seen > > this type of behavior from Subversion? > > This is probably caused by issue 3546 [1][2]. This is a race > condition - if you have several sync processes running at the > same time then the mirror can get corrupted. You had three > commits which were 1 second apart, so your hook script > started 3 copies of svnsync within 2 seconds. I think this > is the first practical report of this bug; previous > discussion was theoretical. > > > Here is a comparison the output of the svn log -v for the offending > > revisions (324,325) on both the corrupted and non-corrupted proxy > > repo. > > It looks like rev 323 got mirrored twice (as mirror revs 323 > and 324), then rev 324 was mirrored (as mirror rev 325). > > > I am a bit concerned about the stability of Subversion > since this is > > the second time in two months that I have had to fix this issue. > > Is there a patch or something to prevent this in the future? > > Suggested workaround: Change your hook scripts to use the > lockf or lockfile tools[3] to ensure that only one instance > of svnsync runs at once. Is it not the case that a svn commit cannot start before the post-commit hooks has finished? I am asking becuase I will be implementing a DR system using svnsync, but I am not planning to let the post-commit finish before svnsync has finished (I don't care if it takes a bit longer, I can cope with that and with my users). Giulio