On Sat, May 21, 2011 at 17:32, <stefan2_at_apache.org> wrote:
> Author: stefan2
> Date: Sat May 21 15:32:16 2011
> New Revision: 1125729
>
> URL: http://svn.apache.org/viewvc?rev=1125729&view=rev
> Log:
> First step towards removing FSFS-specific options from the global
> cache configuration structure. In the future, these settings shall be
> configurable on a per-repository basis and be passed as part of the
> fs_config options hash.
>
> * subversion/include/svn_fs.h
> Â (SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
> Â SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS): define
> * subversion/libsvn_fs_fs/caching.c
> Â (read_config): read additional options from config hash
> Â (svn_fs_fs__initialize_caches): apply these options
>
[..]
> Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1125729&r1=1125728&r2=1125729&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Sat May 21 15:32:16 2011
[..]
> @@ -181,8 +194,16 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (char *)NULL);
> Â svn_memcache_t *memcache;
> Â svn_boolean_t no_handler;
> -
> - Â SVN_ERR(read_config(&memcache, &no_handler, fs, pool));
> + Â svn_boolean_t cache_txdeltas;
> + Â svn_boolean_t cache_fulltexts;
> +
> + Â /* Evaluating the cache configuration. */
> + Â SVN_ERR(read_config(&memcache,
> + Â Â Â Â Â Â Â Â Â Â Â &no_handler,
> + Â Â Â Â Â Â Â Â Â Â Â &cache_txdeltas,
> + Â Â Â Â Â Â Â Â Â Â Â &cache_fulltexts,
> + Â Â Â Â Â Â Â Â Â Â Â fs,
> + Â Â Â Â Â Â Â Â Â Â Â pool));
>
> Â /* Make the cache for revision roots. Â For the vast majority of
> Â Â * commands, this is only going to contain a few entries (svnadmin
> @@ -282,39 +303,35 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
> Â SVN_ERR(init_callbacks(ffd->packed_offset_cache, fs, no_handler, pool));
>
> Â /* initialize fulltext cache as configured */
> - Â if (memcache)
> - Â Â {
> - Â Â Â SVN_ERR(svn_cache__create_memcache(&(ffd->fulltext_cache),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â memcache,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* Values are svn_string_t */
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â APR_HASH_KEY_STRING,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pstrcat(pool, prefix, "TEXT",
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (char *)NULL),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â fs->pool));
> - Â Â }
> - Â else if (svn_cache__get_global_membuffer_cache() &&
> - Â Â Â Â Â svn_get_cache_config()->cache_fulltexts)
> - Â Â {
> - Â Â Â SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->fulltext_cache),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_cache__get_global_membuffer_cache(),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* Values are svn_string_t */
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â APR_HASH_KEY_STRING,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pstrcat(pool, prefix, "TEXT",
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (char *)NULL),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â fs->pool));
> - Â Â }
> - Â else
> - Â Â {
> - Â Â Â ffd->fulltext_cache = NULL;
> - Â Â }
> + Â ffd->fulltext_cache = NULL;
> + Â if (cache_txdeltas)
^^^^^^^^^^ I think you should use 'cache_fulltexts', not 'cache_txdeltas'.
> + Â Â if (memcache)
> + Â Â Â {
> + Â Â Â Â SVN_ERR(svn_cache__create_memcache(&(ffd->fulltext_cache),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â memcache,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* Values are svn_string_t */
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â APR_HASH_KEY_STRING,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pstrcat(pool, prefix, "TEXT",
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (char *)NULL),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â fs->pool));
> + Â Â Â }
> + Â Â else if (svn_cache__get_global_membuffer_cache())
> + Â Â Â {
> + Â Â Â Â SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->fulltext_cache),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_cache__get_global_membuffer_cache(),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* Values are svn_string_t */
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â APR_HASH_KEY_STRING,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pstrcat(pool, prefix, "TEXT",
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (char *)NULL),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â fs->pool));
> + Â Â Â }
>
--
Ivan Zhakov
Received on 2011-05-21 22:15:13 CEST