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

Re: bdb indexing limits

Gaël Roualland wrote:

Looking through bdb code in OpenLDAP 2.3.x, it looks like for a specific index key, no more than 65536 entries are indexed, over which only the first and last potential matching entries are kept.

This is fine for most usages, but I have two questions :
- Is it reasonnably possible to augment this, should this create issues ?

You can simply change the #define's in back-bdb.h to a larger number. It will cause per-thread memory usage to increase accordingly.

- I noticed this limitation is also enforced on the entry children indexing, which means one you created more than 65536 children for an entry, you can no longer remove it ("non leaf" is returned), even after deleting all of its children first. This seems a bit annoying...

If you delete the first or last entry of the range the range will be reduced by one. As such, if you delete entries in order then the range will collapse to zero and allow deletion of the parent.

Would it be possible not to enforce it in that case ?

No. back-bdb has no other mechanism of tracking child entries. back-hdb is superior here since the dn2id index keeps exact counts of the number of children.

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