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

Newbie Question about OpenLDAP C code


We have downloaded OpenLDAP and we launch slpad with a "-d 255" option to
vizualise the log.
We use the test-ordered.ldif file (in openldap-1.2.9/tests/data/)
We launch: ldapsearch -D "cn=Manager, o=University of Michigan, c=US" -b
"cn=Barbara Jensen, ou=Information Technology Division, ou=People,
o=University of Michigan, c=US" "(objectclass=*)"
The result is OK but it appears in the slapd log that all the tree is
parsed. Even the branches that are not concerned by the request. (for
exemple All Staff)
slapd parse the tree in the same order than the entries are added into the
LDAP tree (with the ldif file)

We have a look in the code and I visualized that the add function builds a
bidirectionnal chained list (with the e_lrunext and e_lruprev fields of the
Entry structure)
I was expecting a tree architecture (with for example an Entry structure
with field like : first_son and brother) which allows the server not to
parse all the entries when doing 
a ldapsearch and having a better time response on reading (which is
something asked to an annuary) 

Can someone explain me why the slapd parse all the entries even when I
launch a ldapsearch on 1 Entry. ?
(I undestand that slapd parse all the entries even when I launch a
ldapsearch on 1 Entry if the structure is a bidirectionnal chained list, but
it is the rigth structure to make quick read access ?)

Any information an help will be welcome
Thanks in advance for the time