[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd/overlays pcache.c



ando@OpenLDAP.org wrote:

Update of /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays

Modified Files:
	pcache.c  1.31 -> 1.32

Log Message:
- proxy cache erroneously returns the filtering attributes
 and the objectClass right after caching, even if not requested,
 while subsequent searches are fine;

I think this is a bug; it was also reflected in the test data, which has been
fixed accordingly


- the response callback needs be apended at the end of the
 callback list, otherwise the resulting entries are cached

I ran into this issue while developing an overlay that dynamically builds
entries; the raw entry was being cached instead of the completed one,
because pcache adds its callback only when required, while that of my
overlay is stacked by the overlay infrastructure.  I think the "natural"
behavior of pcache is to cache the final result that is sent to the user.
I guess there might be applications where this is not true, so I made the
original behavior configurable by an (undocumented) directive.

before other overlays can alter them
- the callback structure and its contents needs be freed


Please check if correct; I didn't notice any leak/dangling pointer issue,
and now pcache + bdb doesn't grow even when subjected to heavy load.

Another issue: I had to allow specific directives to be prefixed with
"proxycache-" because the backend's config routine is called __before__
that of the overlays; I would find it more natural that the overlay's config
be called bfore that of the backends, in reverse order with respect to
overlay's instantiation, because it's more natural and intuitive that __after__
an overlay is instantiated, the following directives refer to it. I ran into
problems in adding bdb directives for the pcache overlay stacked onto
a bdb!


p.



   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497