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

Re: post-commit & hot-backup.py

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-07-18 14:07:00 CEST

Blair Zajac <blair@orcaware.com> writes:

> How does svn.collab.net run hot-backup.py? Via cron?
>
> Given the core dump we've been seeing when post-commit fails in the
> server, it seems to me that post-commit does not run at the complete
> end of the commit, i.e. there's stuff that happens afterwords,
> otherwise why would the core dump happen.

After the filesystem completely returns from svn_fs_commit_txn(), the
repos layer executes the post-commit-hook. For details, read the very
short, very simple libsvn_repos/hooks.c.

The core-dump happens because libsvn_repos is crashing somehow when it
tries to execute the subprocess. This causes the main process (httpd)
to crash as well.

> So the question is, is it a good idea to run hot-backup.py from
> post-commit?

Sure, why not? That's exactly what svn.collab.net does.

> Is the repository modified at any point after post-commit is called?

No, the new revision already exists by the time the post-commit-hook
is run.

> Maybe the safe way to run hot-backup.py from post-commit is to
> background it with a 60 second sleep.

Here's what svn.collab.net's post-commit-hook looks like:

# Run the commit-email script with relevant info:
(cd /usr/www/hook-scripts; \
 ${COMMIT_MAILER} ${REPOS} ${REV} -r "dev@subversion.tigris.org" -s "svn commit:" -l ${LOG_FILE} -h ${MY_HOSTNAME} svn@subversion.tigris.org & )

# Run the backup & cleanup script:
(cd /usr/www/hook-scripts; ./hot-backup.py &)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 18 14:08:49 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.