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

Re: Issue with svnsync / feature request for svnadmin

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 13 Nov 2009 13:35:23 +0100

On Fri, Nov 13, 2009 at 09:10:45AM +0000, Stephen Connolly wrote:
> About once per day, one of our repositories will loose
> synchronization.  It's always a different repository, and our theory
> is that the network connection between the US and Europe is being
> temporarily interrupted with the result that the svnsync process times
> out.  Normally this is not an issue, as we have a cron task that
> watches for the svnsync lock being static and un-removed for more than
> 24h,

Can you try syncing via svn:// with an svnsync client >= 1.6.3?
If your OS supports TCP keep-alives, the client should time out much
sooner than 24h in face of network issues. I've added TCP keep-alives
to svnserve, too, and hope that this will end up in 1.6.7.

Of course, this is band-aid.

> What we have noticed is that approx once per week, the network
> disconnect occurs inbetween committing the transaction and updating
> the metadata on rev 0, e.g. svnsync has copied rev 60782, but the
> metadata has not been updated before svnsync's connection terminated.
> So the next time svnsync runs it sees that the repository has a higher
> transaction number than the last copied revision, and as a result it
> bombs out, and that repository falls out of sync.

That's bad. Svnsync should be able to cope with dropping network links.
It's a design issue in svnsync, since synchronisation of commits and
related meta data should really be atomic, but they're not.
Maybe this can be fixed somehow, I don't know.

> Currently, our cron script sends an email to inform that a repository
> has fallen out of sync, I ssh in to the US mirror and roll back the
> current transaction to the last-copied (by deleting the files in the
> FSFS system) and trigger an svnsync again.

What about tweaking the property at rev 0 instead?

> I do not like having to do this by hand.  It is error prone, and AFAIK
> once I upgrade to SVN version 1.6, I will no-longer be able to perform
> the roll-back if I've packed the FSFS shards.
>
> *** Question ***
> Is there any way we could get (for 1.7) into svnadmin the ability to
> purge all transactions after revision N.  We have repositories with
> over 100k transactions and dump/load is just not realistic... and we'd
> really like to have those repositories packed too!
> Such a feature would allow us to have our cron script revert back to
> the last known svnsync update, purge the svnsync lock

Do you mean transactions (commits in progress) or commits that have
already happened? In the latter case, the problem is not as simple
as you might think. See:
http://svn.tigris.org/faq.html#removal
http://subversion.tigris.org/issues/show_bug.cgi?id=516
http://2009.subconf.de/fileadmin/PDF_Dateien/CMConf___SubConf/PDF_Vortraege/MM6.pdf

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2417526

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-13 13:36:32 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.