From: Kurt Zeilenga Date: Wed, 3 Oct 2001 20:20:29 +0000 (+0000) Subject: Enable management of attribute indices. Not yet used by test_filter. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1009 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86a680a4ecd0bfa40fed4980fe7cf53f44f83b2a;p=openldap Enable management of attribute indices. Not yet used by test_filter. --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 06de7a69df..92e3163a59 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -238,7 +238,7 @@ retry: rc = txn_abort( ltid ); goto return_results; } -#if 0 +#if BDB_INDEX /* attribute indexes */ if ( index_entry_add( be, e, e->e_attrs ) != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, "bdb_add: index_entry_add failed\n", diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index 74a55cecd2..63f4fc5318 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -15,6 +15,7 @@ LDAP_BEGIN_DECL +#define BBD_INDEX 1 #define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX #define DN_ONE_PREFIX '%' diff --git a/servers/slapd/back-bdb/idl.h b/servers/slapd/back-bdb/idl.h index b0d414098d..c84cec59ea 100644 --- a/servers/slapd/back-bdb/idl.h +++ b/servers/slapd/back-bdb/idl.h @@ -12,15 +12,9 @@ #include "slap.h" -#if 1 - /* larger IDL sizes (which blow thread stacks) */ + /* larger IDL sizes - likely should be even bigger */ #define BDB_IDL_DB_SIZE (1<<16) /* 64K IDL on disk */ #define BDB_IDL_SIZE (1<<17) /* 128K IDL in memory */ -#else - /* reduced IDL sizes for testing */ -#define BDB_IDL_DB_SIZE (1<<8) /* 256 IDL on disk */ -#define BDB_IDL_SIZE (1<<10) /* 1K IDL in memory */ -#endif #define BDB_IDL_DB_MAX (BDB_IDL_DB_SIZE-32) /* #define BDB_IDL_DB_ALLOC (BDB_IDL_DB_SIZE * sizeof(ID)) */ diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 03c0c29b0b..b1044d59b9 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -127,7 +127,7 @@ int bdb_modify_internal( return rc; } -#if 0 +#if BDB_INDEX /* delete indices for old attributes */ rc = index_entry_del( be, tid, e, save_attrs); diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 096dcec539..9a212c6291 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -156,7 +156,7 @@ ID bdb_tool_entry_put( goto done; } -#if 0 +#if BDB_INDEX rc = bdb_index_entry_add( be, tid, e, e->e_attrs ); if( rc != 0 ) { goto done; @@ -184,7 +184,7 @@ done: return e->e_id; } -#if 0 +#if BDB_INDEX int bdb_tool_entry_reindex( BackendDB *be, ID id )