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

Re: svn commit: r1081097 - in /subversion/trunk/subversion: include/private/svn_cache.h libsvn_fs_fs/caching.c libsvn_fs_fs/tree.c libsvn_subr/cache-inprocess.c tests/libsvn_subr/cache-test.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 4 Apr 2011 04:24:04 +0300

Stefan Fuhrmann wrote on Sun, Apr 03, 2011 at 20:00:28 +0200:
> On 26.03.2011 06:31, Daniel Shahaf wrote:
> >stefan2_at_apache.org wrote on Sun, Mar 13, 2011 at 12:40:50 -0000:
> >>URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1081097&r1=1081096&r2=1081097&view=diff
> >>==============================================================================
> >>--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
> >>+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Sun Mar 13 12:40:49 2011
> >>@@ -3916,7 +3916,9 @@ make_txn_root(svn_fs_root_t **root_p,
> >> svn_fs_fs__dag_serialize,
> >> svn_fs_fs__dag_deserialize,
> >> APR_HASH_KEY_STRING,
> >>- 32, 20, FALSE, root->pool));
> >>+ 32, 20, FALSE,
> >>+ apr_pstrcat(pool, txn, ":TXN", (char *)NULL),
> >This doesn't use namespacing...
> >
> Name spaces are only required for membuffer caches.
> This is a good ol' inprocess cache that will not share
> cached information with other cache instances.
>

If I understand correctly, in other words it's because membuffer caches
are a singleton but "inprocess" caches are not --- and therefore, the ID
needs to be unique only within the scope of this cache, rather than
globally.

Thanks for the explanation,

Daniel

> >So, beyond the theoretical problem, doesn't it mean that a single
> >application that creates two repositories and begins a txn against each
> >repository will mix the two txn's caches? (since txn names are
> >predictable)
> >
> >IOW: shouldn't this use the PREFIX argument that caching.c uses?
> Unless somebody reads the statistics info for this
> cache instance, the id won't be used at all. If someone
> should call svn_cache__get_info on that info for
> profiling etc., the transaction name plus the ":TXN"
> marker should be sufficient to identify the data
> in a log, for instance.
> >>+ root->pool));
> >>
> >> root->fsap_data = frd;
> >>
> >>
> >>Modified: subversion/trunk/subversion/tests/libsvn_subr/cache-test.c
> >>URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/cache-test.c?rev=1081097&r1=1081096&r2=1081097&view=diff
> >>==============================================================================
> >>--- subversion/trunk/subversion/tests/libsvn_subr/cache-test.c (original)
> >>+++ subversion/trunk/subversion/tests/libsvn_subr/cache-test.c Sun Mar 13 12:40:49 2011
> >>@@ -136,6 +136,7 @@ test_inprocess_cache_basic(apr_pool_t *p
> >> 1,
> >> 1,
> >> TRUE,
> >>+ "",
> >> pool));
> >>
> >Same problem... (I imagine we might want to use "" in the cache
> >infrastructure internally some day, for example)
> This is also a cache_inprocess instance. So, we don't need
> a proper ID / prefix here for proper function.
>
> -- Stefan^2.
>
Received on 2011-04-04 03:24:38 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.