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 2014/04/27 14:23:32 UTC
svn commit: r1590384 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c
Author: stefan2
Date: Sun Apr 27 12:23:31 2014
New Revision: 1590384
URL: http://svn.apache.org/r1590384
Log:
Fix DAG cache locking inefficiency: Due to a coding snafu, it create
many locks for the same pool.
* subversion/libsvn_fs_fs/tree.c
(lock_cache): Actually traverse the list of locks.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1590384&r1=1590383&r2=1590384&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Sun Apr 27 12:23:31 2014
@@ -295,9 +295,13 @@ lock_cache(fs_fs_dag_cache_t* cache, apr
But limit the time spent on chasing pointers. */
int limiter = 8;
while (lock && --limiter)
+ {
if (lock->pool == pool)
return;
+ lock = lock->next;
+ }
+
/* create a new lock and put it at the beginning of the lock chain */
lock = apr_palloc(pool, sizeof(*lock));
lock->cache = cache;