You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/01/27 12:15:19 UTC

svn commit: r1726996 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Author: stefan2
Date: Wed Jan 27 11:15:19 2016
New Revision: 1726996

URL: http://svn.apache.org/viewvc?rev=1726996&view=rev
Log:
Fix an inefficiency in membuffer cache key handling on /trunk.
The prefix pool has been effectively unused.

* subversion/libsvn_subr/cache-membuffer.c
  (prefix_pool_get_internal):  Fix the overflow detection.  We want to
                               _accept_ entries until overflow.

Modified:
    subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1726996&r1=1726995&r2=1726996&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Wed Jan 27 11:15:19 2016
@@ -358,7 +358,7 @@ prefix_pool_get_internal(apr_uint32_t *p
 
   bytes_needed = prefix_len + 1 + OVERHEAD;
   assert(prefix_pool->bytes_max >= prefix_pool->bytes_used);
-  if (prefix_pool->bytes_max - prefix_pool->bytes_used > bytes_needed)
+  if (prefix_pool->bytes_max - prefix_pool->bytes_used < bytes_needed)
     {
       *prefix_idx = NO_INDEX;
       return SVN_NO_ERROR;