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 2015/05/16 06:17:25 UTC

svn commit: r1679681 - /subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c

Author: stefan2
Date: Sat May 16 04:17:24 2015
New Revision: 1679681

URL: http://svn.apache.org/r1679681
Log:
On the 1.10-cache-improvements branch:
A r/o cache lookup must never modify the contents.

* subversion/libsvn_subr/cache-membuffer.c
  (find_entry): Don't drop an entry upon key conflict if we perform just
                a lookup. Instead, report that we simply did not find
                what we have been looking for.

Found by: philip

Modified:
    subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c?rev=1679681&r1=1679680&r2=1679681&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c Sat May 16 04:17:24 2015
@@ -1432,7 +1432,9 @@ find_entry(svn_membuffer_t *cache,
                            entry->key.key_len) == 0)
                   return entry;
 
-                /* Key conflict. Drop the current entry. */
+                /* Key conflict. The entry to find cannot be anywhere else.
+                 * Therefore, it is not cached. */
+                return NULL;
               }
 
             /* need to empty that entry */