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

Re: svn commit: r984973 - in /subversion/branches/performance/subversion: include/private/svn_cache.h libsvn_fs_fs/fs_fs.c libsvn_subr/cache-inprocess.c libsvn_subr/cache-membuffer.c libsvn_subr/cache-memcache.c libsvn_subr/cache.c libsvn_subr/cache.

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: Sat, 28 Aug 2010 11:24:37 +0200

Stefan,

On Thu, Aug 12, 2010 at 11:05 PM, <stefan2_at_apache.org> wrote:
> Author: stefan2
> Date: Thu Aug 12 21:04:59 2010
> New Revision: 984973
>
> URL: http://svn.apache.org/viewvc?rev=984973&view=rev
> Log:
> Cache (almost) all representations as full text. To handle contents longer
> than one MB, let the caches decide upon their limits. Also, reps with
> rb->len == 0 may have actual content but we can only cache them once
> the stream gets closed because the content end won't be detected before
> that.
>
> * subversion/include/private/svn_cache.h
>  (svn_cache__is_cachable): declare new API function
>
> * subversion/libsvn_subr/cache.h
>  (svn_cache__vtable_t): add method pointer for is_cachable
> * subversion/libsvn_subr/cache.c
>  (svn_cache__is_cachable): implement by forwarding to the actual cache object
> * subversion/libsvn_subr/cache-memcache.c
>  (memcache_is_cachable): implement is_cachable method
>  (memcache_vtable): adapt vtable
> * subversion/libsvn_subr/cache-membuffer.c
>  (svn_membuffer_cache_is_cachable): implement is_cachable method
>  (membuffer_cache_vtable): adapt vtable
> * subversion/libsvn_subr/cache-inprocess.c
>  (inprocess_cache_is_cachable): implement is_cachable method
>  (inprocess_cache_vtable): adapt vtable
>
[..]

> +static svn_boolean_t
> +memcache_is_cachable(void *, apr_size_t size)
> +{

Unnamed parameters are not allowed in C, so this breaks the build in
gcc. Assuming you're using Visual Studio, I wonder why it allows this
to pass.

Were you planning to use this first parameter?

To get the build of you branch working again I've fixed this is in
r990330 by naming and explicitly making gcc to ignore the parameter.

> +  /* The memcached cutoff seems to be a bit (header length?) under a megabyte.
> +   * We round down a little to be safe.
> +   */
> +  return size < 1000000;
> +}
> +
>  static svn_cache__vtable_t memcache_vtable = {
>   memcache_get,
>   memcache_set,
> -  memcache_iter
> +  memcache_iter,
> +  memcache_is_cachable
>  };
>
[..]

Lieven
Received on 2010-08-28 11:25:52 CEST

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