On Sat, May 21, 2011 at 17:32, <stef...@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