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

Re: [PATCH] Excessive memory use with "SVNPathAuthz short_circuit"

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Wed, 19 Sep 2012 16:12:32 +0400

On Wed, Sep 19, 2012 at 4:07 PM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> Ivan Zhakov <ivan_at_visualsvn.com> writes:
>
>> On Wed, Sep 19, 2012 at 3:07 PM, Roderich Schupp
>> <roderich.schupp_at_gmail.com> wrote:
>>> On Wed, Sep 19, 2012 at 10:24 AM, Roderich Schupp
>>> <roderich.schupp_at_gmail.com> wrote:
>>>> Change the definition of authz_svn__subreq_bypass_func_t (adding a
>>>> pool parameter)
>>>> and its one and only implementation subreq_bypass?
>>>
>>> Patch attached, grabs the same amount of memory as my first version.
>>>
>>>> Since this definition is in include/mod_authz_svn.h (i.e. it's a public interface)
>>>
>>> Perhaps one should also bump #define AUTHZ_SVN__SUBREQ_BYPASS_PROV_VER
>>> in include/mod_authz_svn.h
>>>
>> Adding pool parameter to authz_svn__subreq_bypass_func_t is not enough
>> to fix all memory issues. Request's actively pool used in other places
>> like get_username_to_authorize() or get_access_conf()
>
> Indeed, although the memory use there is small. In some ways we want to
> reuse the request pool here because it allows the access file to be
> cached in the request pool's user data. If we used a new/cleared pool
> in get_access_conf we would have to reread the file.
>
We cache access file in connection pool, not in request pool:
[[
          /* Cache the open repos for the next request on this connection */
          apr_pool_userdata_set(access_conf, cache_key,
                                NULL, r->connection->pool);
]]]

-- 
Ivan Zhakov
Received on 2012-09-19 14:13:25 CEST

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.