On 23 March 2016 at 20:39, <kotkov_at_apache.org> wrote:
> Author: kotkov
> Date: Wed Mar 23 17:39:36 2016
> New Revision: 1736357
>
> URL: http://svn.apache.org/viewvc?rev=1736357&view=rev
> Log:
> Introduce `--no-flush-to-disk' option for `svnadmin load'.
>
> The option can be used to to dramatically speed up the load process when
> there's no need to ensure that the resulting data survives a system crash
> or power loss — e.g., when loading a dump into a fresh new repository.
>
> This is one of the ideas in http://svn.haxx.se/dev/archive-2015-09/0187.shtml
> (Subject: "Whiteboard -- topics list on the white board").
>
Nice option, see my review inline.
[...]
> Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1736357&r1=1736356&r2=1736357&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Wed Mar 23 17:39:36 2016
> @@ -292,6 +292,7 @@ initialize_fs_struct(svn_fs_t *fs)
> fs_fs_data_t *ffd = apr_pcalloc(fs->pool, sizeof(*ffd));
> ffd->use_log_addressing = FALSE;
> ffd->revprop_prefix = 0;
> + ffd->flush_to_disk = FALSE;
I think would be more safe to initialize FLUSH_TO_DISK to TRUE to
match old behavior and prevent possible mistakes in future when some
other codepath will initialize_fs_struct() without calling
read_global_config().
[...]
> Modified: subversion/trunk/subversion/libsvn_fs_fs/revprops.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/revprops.c?rev=1736357&r1=1736356&r2=1736357&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/revprops.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/revprops.c Wed Mar 23 17:39:36 2016
> @@ -776,7 +776,7 @@ switch_to_new_revprop(svn_fs_t *fs,
> apr_pool_t *pool)
> {
> SVN_ERR(svn_fs_fs__move_into_place(tmp_path, final_path, perms_reference,
> - pool));
> + TRUE, pool));
Why ffd->flush_to_disk() is not used here? As far I remember
revprops-only loading from dump is one of the use case and we already
have optimized codepath for them.
--
Ivan Zhakov
Received on 2016-03-25 08:00:39 CET