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

RE: svn commit: rev 7037 - trunk/subversion/libsvn_fs

From: Sander Striker <striker_at_apache.org>
Date: 2003-09-10 20:16:42 CEST

> From: cmpilato@tigris.org [mailto:cmpilato@tigris.org]
> Sent: Wednesday, September 10, 2003 7:49 PM

> Author: cmpilato
> Date: Wed Sep 10 12:48:53 2003
> New Revision: 7037
>
> Modified:
> trunk/subversion/libsvn_fs/fs.c
> trunk/subversion/libsvn_fs/fs.h
> trunk/subversion/libsvn_fs/uuid.c
> Log:
> Implement UUID caching in the svn_fs_t object. This brings the number
> of times we hit the 'uuids' table as part of a checkout of
> Subversion's trunk from 1188 to ... 1. :-)

Woot!

[...]
> Modified: trunk/subversion/libsvn_fs/uuid.c
> ==============================================================================
> --- trunk/subversion/libsvn_fs/uuid.c (original)
> +++ trunk/subversion/libsvn_fs/uuid.c Wed Sep 10 12:48:53 2003
> @@ -46,14 +46,26 @@
> const char **uuid,
> apr_pool_t *pool)
> {
> - struct get_uuid_args args;
> -
> SVN_ERR (svn_fs__check_fs (fs));
>
> - args.fs = fs;
> - args.idx = 1;
> - args.uuid = uuid;
> - SVN_ERR (svn_fs__retry_txn (fs, txn_body_get_uuid, &args, pool));
> + /* Check for a cached UUID first. Failing that, we hit the
> + database. */
> + if (fs->uuid)
> + {
> + *uuid = apr_pstrdup (pool, fs->uuid);

Why are we dupping the uuid? The lifetime for the fs pool is longer
than the pool being passed in AFAICT. Are we going to modify that
uuid string in place elsewhere?

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 10 20:17:37 2003

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.