You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/05/24 01:50:59 UTC
svn commit: r1597222 - in /subversion/trunk/subversion/libsvn_fs_x: ./ fs.h
fs_x.c tree.c
Author: stefan2
Date: Fri May 23 23:50:58 2014
New Revision: 1597222
URL: http://svn.apache.org/r1597222
Log:
Sync'ing FSX with FSFS:
Merge revisions r1577362 from subversion/libsvn_fs_fs into
subversion/libsvn_fs_x and resolve a trivial tree conflict.
This ports the "pack after every commit" option to FSX.
Modified:
subversion/trunk/subversion/libsvn_fs_x/ (props changed)
subversion/trunk/subversion/libsvn_fs_x/fs.h
subversion/trunk/subversion/libsvn_fs_x/fs_x.c
subversion/trunk/subversion/libsvn_fs_x/tree.c
Propchange: subversion/trunk/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_fs_fs:r1577362
Modified: subversion/trunk/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs.h?rev=1597222&r1=1597221&r2=1597222&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs.h Fri May 23 23:50:58 2014
@@ -115,6 +115,8 @@ extern "C" {
#define CONFIG_OPTION_BLOCK_SIZE "block-size"
#define CONFIG_OPTION_L2P_PAGE_SIZE "l2p-page-size"
#define CONFIG_OPTION_P2L_PAGE_SIZE "p2l-page-size"
+#define CONFIG_SECTION_DEBUG "debug"
+#define CONFIG_OPTION_PACK_AFTER_COMMIT "pack-after-commit"
/* The format number of this filesystem.
This is independent of the repository format number, and
@@ -404,6 +406,9 @@ typedef struct fs_x_data_t
/* Compression level to use with txdelta storage format in new revs. */
int delta_compression_level;
+ /* Pack after every commit. */
+ svn_boolean_t pack_after_commit;
+
/* Pointer to svn_fs_open. */
svn_error_t *(*svn_fs_open_)(svn_fs_t **, const char *, apr_hash_t *,
apr_pool_t *);
Modified: subversion/trunk/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs_x.c?rev=1597222&r1=1597221&r2=1597222&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs_x.c Fri May 23 23:50:58 2014
@@ -271,6 +271,12 @@ read_config(fs_x_data_t *ffd,
ffd->block_size *= 0x400;
ffd->p2l_page_size *= 0x400;
+ /* Debug options. */
+ SVN_ERR(svn_config_get_bool(config, &ffd->pack_after_commit,
+ CONFIG_SECTION_DEBUG,
+ CONFIG_OPTION_PACK_AFTER_COMMIT,
+ FALSE));
+
/* memcached configuration */
SVN_ERR(svn_cache__make_memcache_from_config(&ffd->memcache, config,
result_pool, scratch_pool));
Modified: subversion/trunk/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/tree.c?rev=1597222&r1=1597221&r2=1597222&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/tree.c Fri May 23 23:50:58 2014
@@ -2118,6 +2118,7 @@ svn_fs_x__commit_txn(const char **confli
svn_error_t *err = SVN_NO_ERROR;
svn_stringbuf_t *conflict = svn_stringbuf_create_empty(pool);
svn_fs_t *fs = txn->fs;
+ fs_x_data_t *ffd = fs->fsap_data;
/* Limit memory usage when the repository has a high commit rate and
needs to run the following while loop multiple times. The memory
@@ -2198,7 +2199,15 @@ svn_fs_x__commit_txn(const char **confli
cleanup:
svn_pool_destroy(iterpool);
- return svn_error_trace(err);
+
+ SVN_ERR(err);
+
+ if (ffd->pack_after_commit)
+ {
+ SVN_ERR(svn_fs_x__pack(fs, NULL, NULL, NULL, NULL, pool));
+ }
+
+ return SVN_NO_ERROR;
}