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

Re: (ITS#5756) 2.4 slapo-pcache only caches first lookup for certain templates



toby@inf.ed.ac.uk wrote:
> Full_Name: Toby Blake
> Version: 2.4.11
> OS: Scientific Linux 5.1
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (87.115.7.181)
> 
> 
> Hello,
> 
> Caching of (more complex) lookups doesn't seem to work correctly using
> openldap 2.4 and slapo-pcache.
> 
> Identical set-ups, one using openldap 2.3.43 and one using openldap
> 2.4.11 (+patch for ITS #5665).  Trivial testing of 2.4.12 suggests
> that the problem remains.

The issue is confirmed.  I could reproduce it with a much simpler 
configuration:

overlay         pcache
proxycache      bdb 100 2 6 1m
proxyattrset 0          uid
proxyattrset 1          cn
proxytemplate           "(&(objectClass=)(uid=))" 0 1m 1m
proxytemplate           "(uid=)" 1 1m 1m

Note that swapping the attrsets and templates does not affect it: the 
template with the simple filter works, while the other doesn't.  I was 
unable to detect the root cause, but it seems to be related to query 
confinement, where something about the first filter does not allow to 
store the second query, since the first bit, (objectClass=x), is 
identical in both queries.

Note that swapping the simple filters, making the "unique portion come 
first, cures the problem:

overlay         pcache
proxycache      bdb 100 2 6 1m
proxyattrset 0          uid
proxyattrset 1          cn
proxytemplate           "(&(uid=)(objectClass=))" 0 1m 1m
proxytemplate           "(uid=)" 1 1m 1m

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------