You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2013/07/24 14:43:10 UTC

Re: svn commit: r1492651 - in /subversion/trunk: ./ subversion/include/ subversion/libsvn_repos/ subversion/svnadmin/ subversion/tests/cmdline/ tools/dist/

On Thu, Jun 13, 2013 at 4:49 PM,  <pr...@apache.org> wrote:
> Author: prabhugs
> Date: Thu Jun 13 12:49:49 2013
> New Revision: 1492651
>
> URL: http://svn.apache.org/r1492651
> Log:
> Merge the verify-keep-going branch to trunk.
> Implement a new "--keep-going" switch to svnadmin verify. Use this switch to
> continue verify even after a repository corruption is seen. Without this
> switch the verify process would stop when it sees any repository corruption.
>
Hi Stefan,

It seems I found very serious problem in this commit. See below.

> --- subversion/trunk/subversion/libsvn_repos/dump.c (original)
> +++ subversion/trunk/subversion/libsvn_repos/dump.c Thu Jun 13 12:49:49 2013
[....]

> @@ -1359,9 +1424,10 @@ verify_fs2_notify_func(svn_revnum_t revi
>  }
>
>  svn_error_t *
> -svn_repos_verify_fs2(svn_repos_t *repos,
> +svn_repos_verify_fs3(svn_repos_t *repos,
>                       svn_revnum_t start_rev,
>                       svn_revnum_t end_rev,
> +                     svn_boolean_t keep_going,
>                       svn_repos_notify_func_t notify_func,
>                       void *notify_baton,
>                       svn_cancel_func_t cancel_func,
> @@ -1375,6 +1441,8 @@ svn_repos_verify_fs2(svn_repos_t *repos,
[....]

>
> +  for (rev = start_rev; rev <= end_rev; rev++)
> +    {
>        svn_pool_clear(iterpool);
>
> -      /* Get cancellable dump editor, but with our close_directory handler. */
> -      SVN_ERR(get_dump_editor(&dump_editor, &dump_edit_baton,
> -                              fs, rev, "",
> -                              svn_stream_empty(iterpool),
> -                              NULL, NULL,
> -                              verify_close_directory,
> -                              notify_func, notify_baton,
> -                              start_rev,
> -                              FALSE, TRUE, /* use_deltas, verify */
> -                              iterpool));
> -      SVN_ERR(svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
> -                                                dump_editor, dump_edit_baton,
> -                                                &cancel_editor,
> -                                                &cancel_edit_baton,
> -                                                iterpool));
> -
> -      SVN_ERR(svn_fs_revision_root(&to_root, fs, rev, iterpool));
> -      SVN_ERR(svn_fs_verify_root(to_root, iterpool));
The call to svn_fs_verify_root() was just removed and never get
called. That means that svnadmin @trunk doesn't perform FS specific
filesystem checks for every revision.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Re: svn commit: r1492651 - in /subversion/trunk: ./ subversion/include/ subversion/libsvn_repos/ subversion/svnadmin/ subversion/tests/cmdline/ tools/dist/

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jul 24, 2013 at 04:43:10PM +0400, Ivan Zhakov wrote:
> The call to svn_fs_verify_root() was just removed and never get
> called. That means that svnadmin @trunk doesn't perform FS specific
> filesystem checks for every revision.

Thanks. This should fix it.

[[[
* subversion/libsvn_repos/dump.c
  (verify_one_revision): Run svn_fs_verify_root() to ensure full
    verification of the revision.
]]]

Index: subversion/libsvn_repos/dump.c
===================================================================
--- subversion/libsvn_repos/dump.c	(revision 1506445)
+++ subversion/libsvn_repos/dump.c	(working copy)
@@ -1384,6 +1384,7 @@ verify_one_revision(svn_fs_t *fs,
                                             &cancel_edit_baton,
                                             scratch_pool));
   SVN_ERR(svn_fs_revision_root(&to_root, fs, rev, scratch_pool));
+  SVN_ERR(svn_fs_verify_root(to_root, scratch_pool));
   SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
                             cancel_editor, cancel_edit_baton,
                             NULL, NULL, scratch_pool));