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

Re: no-op search control, large result sets and abandon



Michael Ströder wrote:
HI!

In web2ldap I've implemented a feature some time ago which uses the no-op
search control to determine the overall number of results when only displaying
a partial result set.
Obviously this does not scale well when interactively browsing into a
container with many entries.

So I'm considering whether to make this configurable (default off) or to make
something automagically. My current working code sends a search no-op request
with small timeout (5 sec), catches the error if the no-op search would take
longer (Python exception ldap.TIMEOUT) and sends abandon request in this case.

The idea is trying to determine the overall number of results only if it does
not put too much burden on the server. But I wonder whether sending the
abandon request really helps to reduce the server load:
Does slapd immediately stop processing the no-op search request?
Or does it generate the result set but not return it to the client?

If the connection has not been throttled due to too many outstanding requests, the abandon will be processed almost immediately. It will generate the entire filtered candidate set first, but usually those index lookups are cheap.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/