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

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

Ralf Haferkamp wrote:
> On Freitag, 21. September 2007, hyc@symas.com wrote:
>> rhafer@suse.de wrote:
>>> Please note that test020 currently fails in HEAD sometime. I think this
>>> depends on the order in which the results for queries that hit the
>>> sizelimit are returned.
>> It seems to be failing for me more often than not. Why is it
>> non-deterministic?
> It seems that the order in which the entries are inserted into the cache is 
> non-deterministic. Because of that the order in which they are returned from 
> cache varies as well. The final test that compares the ldapsearch results 
> with proxycache.out relies on the order.
> I get a lot of DB_LOCK_DEADLOCK in slapd.2.log and if I don't missread the log 
> it seems that sometimes the entries from Query 9 get inserted into the cache 
> before the entry from Query 5 ("cn=Bjorn Jensen,ou=Information Technology 
> Division, ...") and sometimes after. Depending on that the test either fails 
> or succeeds.
OK, I see that as well. In fact setting a breakpoint on the Deadlock result, I 
see 3 threads still trying to add entries to the cache when the deadlock 
occurs. This appears to be a consequence of letting the client continue on 
before the pcache overlay has finished its work. But, I thought you were 
locking the cache so that requests would not run while query processing was 
   -- 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/