/[Apache-SVN]
ViewVC logotype

Revision 1575418


Jump to revision: Previous Next
Author: stefan2
Date: Fri Mar 7 21:35:54 2014 UTC (10 years, 1 month ago)
Changed paths: 5
Log Message:
Enable FSFS format 7 repositories to be packed without completely
blocking commits.  We simply introduce a separate lock file for
'svnadmin pack' and take out the global write lock for packing
revprops and switching the shard to "packed" state.

Most of the run time is spent building the revision pack file
and does not require any synchronization with writers.

Packing large shards no longer causes noticable delays to committers.
This is important for format 7 because the data reorganization may
involes significantly more I/O than the append-only process used
with previous formats.  We can now pack during 'svnadmin load'
without delaying the process.

* subversion/libsvn_fs_fs/fs.h
  (PATH_PACK_LOCK_FILE): Declare the new lock file name.
  (SVN_FS_FS__MIN_PACK_LOCK_FORMAT): Define when that is available.

* subversion/libsvn_fs_fs/fs_fs.h
  (svn_fs_fs__get_lock_on_filesystem): Publish previously static function.

* subversion/libsvn_fs_fs/fs_fs.c
  (get_lock_on_filesystem): Rename to ...
  (svn_fs_fs__get_lock_on_filesystem): ... this.
  (with_some_lock_file): Update caller.

* subversion/libsvn_fs_fs/pack.c
  (pack_baton): Extend by adding all previous parameters of the pack_*
                functions as members.  All pack_* function now use the
                baton for their parameter passing.
  (synced_pack_shard): Extracted from pack_shard; handles the revprop
                       packing and shard pack switch-over.  This will
                       be executed while holding the global write lock.
  (pack_shard): Wraps the above and adds the parts that don't require
                the global write lock such as packing the rev data.
  (pack_body): Use the baton to pass parameters along.
  (svn_fs_fs__pack): When available, acquire only the pack-lock.

* subversion/libsvn_fs_fs/structure
  (Layout of the FS directory): Document the new lock file and update
                                the doc for the global write-lock.

Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs.h 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/libsvn_fs_fs/pack.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/structure modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26