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

Re: (ITS#5113) pcache returns incomplete results



rhafer@suse.de wrote:

> Hm, current HEAD first calls add_query, which adds the CachedQuery to the 
> cache and after that calls cache_entries to add the entries of that Query to 
> the cache. That means that query_containment already know about the Query 
> before its result is completely cached.
> In RE23 it is just the other way arround (first cache_entries() then 
> add_query()).
> I see two possible solution:
> 
> 1. Switch back to the old behaviour. But I guess the change was made for a 
> reason. I don't know that yet. Seems the change happend between r1.95 and 
> r1.96 of pcache.c (log message: "Fix concurrency issues").
> 
> 2. Protect the cached query with an rw_lock. Writelock it while 
> cache_entries() is executing and readlock it during searches. This would give 
> us the behaviour that Ando suggested in the discussion of ITS#5112. (pcache 
> would not try to cache the same search request mulitple times, but block the 
> second request until the first one is cached and then answer it from the 
> cache)

+1 (if there's no drawback, of course)

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
Email:   pierangelo.masarati@sys-net.it
---------------------------------------