subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Stieger <andreas.stie...@gmx.de>
Subject Re: Any know of a Subversion sync program that I could run as a daemon?
Date Tue, 25 Nov 2014 22:20:26 GMT
Hello,

On 25/11/14 21:54, Eric Johnson wrote:
> Problem: Now I need to trigger a sync whenever a commit comes in. In
> principle, this is easy - I just write a hook script and call svnsync.
> 
> In practice, I have a bunch of requirements & desired features that make
> a simplistic solution problematic
> 
>   * Asynchronous - I don't want the person doing the original commit
>     sitting around waiting for their commit to be broadcast to all the
>     mirrors. I'm potentially looking at long delays either to distance
>     or network pipe, and occasional large commits that take long enough
>     even to send to the server in the first place.

The recommended configuration is to run sync calls in the background by
detaching it from the calling shell, thus allowing the already competed
revision to be marshalled back to the client. How to detach it from the
calling process depends on your platform so I will not give an example.
This will also allow you to fire off all syncs in parallel. In my
configurations, the typical RTT is 0 to 3 seconds.

>   * Retry on fail - I want to be able to retry on fail, in case the
>     problem is a transient network issue

Hooks will be re-called upon the next commit. Also hook this up to your
out-of-band monitoring to respond. Note that the stale lock situation is
actually the most frequent issue you will get with network issues, and
this cannot be solved by a retry.

>   * Email on fail - I want an email if the sync fails
>   * Logging - information to log files on both success and failure.

Again add logging to hook, and run out-of-band monitoring, e.g. run "svn
info" on all URLs, fetch the XML, compare the latest revision. I get a
nice little table with red/green numbers and dates.

> Are there any open source tools out there already that do that?

I am not aware of freely licensed complete toolsets for this. As the ASF
infra team runs such a setup there are certainly some public scripts.

Andreas

Mime
View raw message