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

indexed search



hi,

i've a problem with the index-files of openldap2.0+

when i'm searching my db for uid=test1, slapd is checking each single
entry in the uid.dbb file for matching my filter. if my db contains lots
of entries (like 250,000) the search lasts *very* long. openldap1.2+
doesn't do this. (it's kind of a hash-function(?))
debugging-output of slapd (2.0. is as follows (debuglevel 65535)

...
line 32 (database       ldbm)
line 33 (suffix         "ou=mail-users,o=orion-infonova,c=AT")
line 36 (directory      /usr/local/openldap2/data/mail)
line 37 (index          uid eq)
index uid 0x0004
line 38 (index          mail eq)
index mail 0x0004                                    <-------------seems
to be ok(?)
slapd startup: initiated.
...
...
search_candidates: base="OU=MAIL-USERS,O=ORION-INFONOVA,C=AT" s=2 d=0
=> filter_candidates
        AND
=> list_candidates 0xa0
=> filter_candidates
        DN
SUBTREE
<------------this the problem?
=> dn2idl( "@OU=MAIL-USERS,O=ORION-INFONOVA,C=AT" )
=> ldbm_cache_open( "/usr/local/openldap2/data/mail/dn2id.dbb", 7, 600 )

<= ldbm_cache_open (cache 0)
<= filter_candidates 13
=> filter_candidates
        OR
=> list_candidates 0xa1
=> filter_candidates
        EQUALITY
=> equality_candidates
<= equality_candidates: index_param failed (18)
<------------ this the problem?
<= filter_candidates 14
=> filter_candidates
        EQUALITY
=> equality_candidates
=> ldbm_cache_open( "/usr/local/openldap2/data/mail/uid.dbb", 16, 600 )
<= ldbm_cache_open (cache 3)
...
...
=> id2entry_r( 9 )
entry_rdwr_rtrylock: ID: 9
====> cache_find_entry_id( 9 ) "uid=test8, ou=Mail-Users,
o=orion-infonova, c=AT" (found) (1 tries)
<= id2entry_r( 9 ) 0x811b780 (cache)
=> test_filter
    EQUALITY
=> access_allowed: search access to "uid=test8, ou=Mail-Users,
o=orion-infonova, c=AT" "uid" requested
=> acl_get: [1] check attr uid
<= acl_get: [1] acl uid=test8, ou=Mail-Users, o=orion-infonova, c=AT
attr: uid
=> acl_mask: access to entry "uid=test8, ou=Mail-Users,
o=orion-infonova, c=AT", attr "uid" requested
=> acl_mask: to value by "", (=n)
<= check a_peername_path: IP=127.0.0.1
=> string_expand: pattern:  IP=127.0.0.1
=> string_expand: expanded: IP=127.0.0.1
=> regex_matches: string:   IP=127.0.0.1:4066
=> regex_matches: rc: 0 matches
<= acl_mask: [1] applying write (=wrscx) (stop)
<= acl_mask: [1] mask: write (=wrscx)
=> access_allowed: search access granted by write (=wrscx)
<= test_filter 5
candidate 9 does match filter
entry_rdwr_runlock: ID: 9
====> cache_return_entry_r( 9 ): returned (0)
...
the last part is repeated for each entry in the db.

openldap1.2+ only does this for the entry that is requested by he client

any comments are welcome, thx in advance

daniel
--
Daniel Tiefnig
Servertechnology
INFONOVA IT GmbH