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

Re: (ITS#5114) pcache cache results for searches that hit size/timelimit

ando@sys-net.it wrote:
> ando@sys-net.it wrote:
>> Please disregard; there's still a couple of issues that I wasn't aware
>> and that need to be dealt with.  Actually, caching those results may
>> make further requests that look compatible with this to erroneously use
>> that dataset.
> The issue here is that a search exceeding sizelimit, if not cached,
> would destroy cacheability of all searches contained in it.  Since a
> search that could exceed sizelimit is likely to include substrings or
> so, things like (mail=*domain.com) exceeding sizelimit would make all
> searches for (mail=foo@domain.com) non cacheable.  I fear there's little
> to do about this, unless we want to heavily rework query containment
> stuff (and I don't feel like, as I'm having hard times in understanding
> what that code does).  So I have now a bottomline fix that handles
> sizelimit correctly, but makes all cacheable queries contained in the
> offending one no longer answerable.

Can you spell out again what behavior you're aiming for?

I think what makes sense so far is:
If the client provides a sizelimit, save that away. Forward the request with no 
sizelimit, so the cache can see everything.

If the forwarded request hits a sizelimit, I think we can still use the result. 
While there's no guarantee that repeated attempts to search the remote server 
would return the exact same set of entries, there's also no harm done if the 
cache does so.

But if the result exceeds the cache's sizelimit, the result set must be 
uncached, same as now.
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/