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

RE: commit: ldap/servers/slapd/back-bdb back-bdb.h cache.c dn2id.c proto-bdb.h



>Sorry for the trouble. I don't know how to reproduce your SLAPI search, you
>may have to single-step thru hdb_dn2idl to see what it's doing wrong.

Ah, I tell a lie -- it has nothing to do with SLAPI. The search works if I
root it at the backend suffix, probably because the BDB_IDL_ALL short-cut
in hdb_dn2idl() -- hdb_dn2idl_internal() is never called.

However, if I root the search at a sub-entry of the backend suffix, then
the search fails to return any entries (regardless of whether it is
performed over LDAP or internally using SLAPI).

Breakpoint 7, hdb_dn2idl_internal (cx=0xbf0fe530) at dn2id.c:920
920             if ( cx->bdb->bi_idl_cache_size ) {
(gdb) next
930             BDB_IDL_ZERO( cx->tmp );
(gdb) 
932             if ( !cx->ei ) {
(gdb) 
940             bdb_cache_entryinfo_lock( cx->ei );
(gdb) 
945             if ( cx->ei->bei_ckids+1 != cx->ei->bei_dkids ) {
(gdb) 
1013                    cx->rc = 0;
(gdb) 
1014                    if ( cx->ei->bei_ckids > 0 ) {
(gdb) 
1019                            avl_apply( cx->ei->bei_kids, apply_func, cx->tmp, -1, AVL_POSTORDER );
(gdb) p cx->ei->bei_kids
$13 = (Avlnode *) 0x82d2820
(gdb) p cx->ei[0]
$14 = {bei_parent = 0x82d1f88, bei_id = 2, bei_state = 8, bei_nrdn = {bv_len = 8, bv_val = 0x82d2068 "ou=links"}, bei_rdn = {bv_len = 8, 
    bv_val = 0x82d1d88 "ou=Links"}, bei_modrdns = 0, bei_ckids = 1, bei_dkids = 2, bei_e = 0x82d2428, bei_kids = 0x82d2820, 
  bei_kids_mutex = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 0, __m_lock = {__status = 1, __spinlock = 0}}, 
  bei_lrunext = 0x82d2ee0, bei_lruprev = 0x0}
(gdb) p cx->ei->bei_kids[0]
$15 = {avl_data = 0x82d2798, avl_bf = 0, avl_left = 0x0, avl_right = 0x0}

If I read this correctly, "ou=links" has no children in the AVL tree, even
though it actually should have one child ("ou=off.padl.com", as it happens).

-- Luke