[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1078990 - in /subversion/trunk: ./ subversion/libsvn_fs_fs/caching.c subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/fs_fs.c

From: Stefan Fuhrmann <eqfox_at_web.de>
Date: Tue, 08 Mar 2011 20:42:17 +0100

On 07.03.2011 23:40, Daniel Shahaf wrote:
> stefan2_at_apache.org wrote on Mon, Mar 07, 2011 at 22:28:25 -0000:
>> Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1078990&r1=1078989&r2=1078990&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
>> +++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Mon Mar 7 22:28:25 2011
>> @@ -227,5 +227,28 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
>> SVN_ERR(svn_cache__set_error_handler(ffd->txdelta_window_cache,
>> warn_on_cache_errors, fs, pool));
>>
>> + /* initialize node revision cache, if caching has been enabled */
>> + if (svn_fs__get_global_membuffer_cache())
>> + {
>> + SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->node_revision_cache),
>> + svn_fs__get_global_membuffer_cache(),
>> + svn_fs_fs__serialize_node_revision,
>> + svn_fs_fs__deserialize_node_revision,
>> + APR_HASH_KEY_STRING,
>> + apr_pstrcat(pool,
>> + prefix,
>> + "NODEREVS",
>> + NULL),
>> + fs->pool));
>> + }
> /me wonders if we should maintain somewhere a list of all the "cache key" namespaces...
>
> (i.e., should someone else use the "fsfs:$uuid:NODEREVS" prefix, the end
> results won't be nice :-[ )
It wouldn't, indeed. However, all these prefixes are being constructed,
i.e. implicitly listed, in the svn_fs_fs__initialize_caches function.

So, unless somebody else calls svn_cache__create_membuffer_cache
the risk of key space collisions is minimal.

-- Stefan^2.
Received on 2011-03-08 20:42:49 CET

This is an archived mail posted to the Subversion Dev mailing list.