/[Apache-SVN]
ViewVC logotype

Revision 1875921


Jump to revision: Previous Next
Author: stsp
Date: Tue Mar 31 08:53:55 2020 UTC (4 years ago)
Changed paths: 9
Log Message:
Introduce 'svnadmin build-repcache' command.

Implement the 'svnadmin build-repcache' CLI and add an ioctl API for building
the representation cache.

The implementation iterates over revisions in the specified range and recursively
processes the changed nodes, starting from the corresponding revision roots.
For each changed node, it ensures that its data and property representations
exist in the rep-cache. The nodes are processed in the same order as when
committing a transaction (see write_final_rev() function in libsvn_fs_fs/transaction.c),
so that the rep-cache.db files are fully consistent.

* subversion/svnadmin/svnadmin.c
  (cmd_table): Add and document the 'build-repcache' command.
  (subcommand_build_repcache,
   build_rep_cache,
   build_rep_cache_progress_func): New.

* subversion/include/svn_error_codes.h
  (SVN_ERR_FS_REP_SHARING_NOT_ALLOWED,
   SVN_ERR_FS_REP_SHARING_NOT_SUPPORTED): New error codes.

* subversion/include/private/svn_fs_fs_private.h
  (svn_fs_fs__ioctl_build_rep_cache_input_t,
   SVN_FS_FS__IOCTL_BUILD_REP_CACHE): New.

* subversion/libsvn_fs_fs/fs.c
  (fs_ioctl): Handle SVN_FS_FS__IOCTL_BUILD_REP_CACHE.

* subversion/libsvn_fs_fs/fs_fs.h
* subversion/libsvn_fs_fs/fs_fs.c
  (): Include 'low_level.h'.
  (svn_fs_fs__build_rep_cache,
   reindex_node,
   ensure_representation_sha1): New. Iterate over revisions and recursively
   process the changed nodes. For each changed node, ensure that its data
   and property representations exist in the rep-cache.

* subversion/tests/cmdline/svnadmin_tests.py
  (build_repcache): New test.
  (test_list): Add the new test.

* subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
  (): Include 'libsvn_fs_fs/rep-cache.h' and 'libsvn_fs/fs-loader.h'.
  (build_rep_cache): New test.
  (test_funcs): Add the new test.

* tools/client-side/bash_completion
  (_svnadmin): Add the 'build-repcache' command.

Patch by: Denis Kovalchuk <denis.kovalchuk@visualsvn.com>


Changed paths

Path Details
Directorysubversion/trunk/subversion/include/private/svn_fs_fs_private.h modified , text changed
Directorysubversion/trunk/subversion/include/svn_error_codes.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs_fs.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs_fs.h modified , text changed
Directorysubversion/trunk/subversion/svnadmin/svnadmin.c modified , text changed
Directorysubversion/trunk/subversion/tests/cmdline/svnadmin_tests.py modified , text changed
Directorysubversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c modified , text changed
Directorysubversion/trunk/tools/client-side/bash_completion modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26