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

Re: [PATCH] verify at each commit

From: Branko Čibej <brane_at_wandisco.com>
Date: Wed, 27 Mar 2013 05:14:51 +0100

On 26.03.2013 23:11, Daniel Shahaf wrote:
> [[[
> Run the per-revision verify code on a transaction just before it becomes
> a revision. The intent is to catch corruption bugs as early as possible.
>
> * subversion/libsvn_fs/fs-loader.c
> (svn_fs_commit_txn): As above.
> ]]]
>
> [[[
> Index: subversion/libsvn_fs/fs-loader.c
> ===================================================================
> --- subversion/libsvn_fs/fs-loader.c (revision 1461335)
> +++ subversion/libsvn_fs/fs-loader.c (working copy)
> @@ -761,6 +761,11 @@ svn_fs_commit_txn(const char **conflict_p, svn_rev
> fs_path = svn_fs_path(fs, pool);
> #endif
>
> +#ifdef SVN_DEBUG
> + /* Verify. */
> + SVN_ERR(svn_fs_verify_rev(fs, txn_root, pool));
> +#endif
> +
> err = txn->vtable->commit(conflict_p, new_rev, txn, pool);
>
> #ifdef SVN_DEBUG
> ]]]
>
> Maybe this should be optional behaviour in release mode, too?

I was thinking the same; as it is, it doesn't really help, since most of
the time only Subversion developers will be running our test suite with
SVN_DEBUG enabled.

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2013-03-27 05:15:30 CET

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.