Howard Chu [Wed, 28 Nov 2001 20:48:06 +0000 (20:48 +0000)]
Renamed BDB_ID2ENTRY_PAGESIZE to just BDB_PAGESIZE; set it on each database
instead of just the id2entry db. It helps. I also found that tweaking the
environment (set_lg_bsize 2MB; set_cachesize 2MB) helps but those can be
taken care of in a DB_CONFIG file. Tweaked the bdb_bt_compare function; it
really only needs to be set on little-endian machines. (On big-endian machines
a lexical sort gives the same result as an integer sort.) Moved the final
checkpoint back to the dbenv_close, I think this leaves a cleaner log file.
Kurt Zeilenga [Wed, 28 Nov 2001 02:05:14 +0000 (02:05 +0000)]
Cthread changes for the Hurd.
---
Copyright 2001, Igor Khavkine, All rights reserved.
This is free software; you can redistribute and use it
under the same terms as OpenLDAP itself.
Howard Chu [Tue, 27 Nov 2001 12:36:52 +0000 (12:36 +0000)]
Set the id2entry database pagesize to BDB_ID2ENTRY_PAGESIZE to avoid
overflow/fragmentation. (This is now 16K vs default 4K.) It turns out
that the entries' on-disk format is quite space-inefficient, storing
4 bytes per pointer or integer when typically >50% of those bytes are
zero. Oh well. It's about a 2:1 space increase over ldbm now, vs 4:1
before when all the entries were overflowing the 4K pages.
Howard Chu [Tue, 27 Nov 2001 10:15:23 +0000 (10:15 +0000)]
Eliminated nextid database. id2entry database is now maintained in numerical
order, so the lastid is always the same as the last entry's ID. This is
an incompatible db file change.
Howard Chu [Tue, 27 Nov 2001 02:35:20 +0000 (02:35 +0000)]
Added "dbnotxn" config keyword. If present, back-bdb uses DB_INIT_CDB
(Concurrent Data Store mode) instead of DB_INIT_TXN. Faster, but tends
to impede writers.
Howard Chu [Mon, 26 Nov 2001 19:32:39 +0000 (19:32 +0000)]
Some tweaks to cut down on IDL stack usage. idl_intersection and idl_union
now take only two arguments instead of 3, overwriting the result onto the
first argument. (glibc2.0.7 defaults to a 2MB stack per thread; 3 IDLs at
1.5MB plus various other runtime overhead is enough to trash the stack.)
Also pass in a tmp IDL from search_candidates instead of allocating it in
each candiate function.
Howard Chu [Sat, 24 Nov 2001 03:46:02 +0000 (03:46 +0000)]
Removed unused "range" argument from indexing functions. Fixed more
bugs in indexing. Uncommented #define to turn on indexing in back-bdb.h.
It looks like it's working.
fix misinitialized UNDEFINED attribute type; reordered members of AttributeType because I don't know a portable way to statically initialize a mutex :)
Howard Chu [Sat, 17 Nov 2001 04:41:47 +0000 (04:41 +0000)]
First pass at indexing cleanup. Both filterindex.c and search.c now
compile cleanly when BDB_FILTER_INDICES is defined, but I have not
yet seen whether any of it actually works. In particular, I don't
understand the "range" argument to the candidate functions...
Howard Chu [Fri, 16 Nov 2001 08:18:58 +0000 (08:18 +0000)]
Changed AttributeType.sat_cname from char * to struct berval.
Forced SLAP_USE_AD code, removed ifdefs of old code. filterindex.c is
still badly broken when BDB_FILTER_INDICES is defined, working on that...
Howard Chu [Fri, 16 Nov 2001 07:39:14 +0000 (07:39 +0000)]
Changed global ad_mutex into per-attributeType mutex. Added
ad_find_lang() to search an AttributeType for a given language variant.
(Will be used in back-bdb/back-ldbm index code...)