From 1d9818a8da897e418304d3ec5098b23269d7afa9 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 7 Dec 2001 07:07:55 +0000 Subject: [PATCH] Re-introduce BDB_ID2ENTRY_PAGESIZE. Even if the index databases can get by on 4K pages, the id2entry database still needs more (16K). --- servers/slapd/back-bdb/back-bdb.h | 4 ++++ servers/slapd/back-bdb/init.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index baa408a366..d9b38e4399 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -54,6 +54,10 @@ LDAP_BEGIN_DECL * When using BDB_IDL_MULTI, the IDL size is no longer an issue. Smaller * pages are better for concurrency. */ +#ifndef BDB_ID2ENTRY_PAGESIZE +#define BDB_ID2ENTRY_PAGESIZE 16384 +#endif + #ifndef BDB_PAGESIZE #ifdef BDB_IDL_MULTI #define BDB_PAGESIZE 4096 /* BDB's original default */ diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 66eb7ce861..41e4c37b77 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -244,6 +244,11 @@ bdb_db_open( BackendDB *be ) if( i == BDB_ID2ENTRY ) { rc = db->bdi_db->set_bt_compare( db->bdi_db, bdb_bt_compare ); + rc = db->bdi_db->set_pagesize( db->bdi_db, + BDB_ID2ENTRY_PAGESIZE ); + } else { + rc = db->bdi_db->set_pagesize( db->bdi_db, + BDB_PAGESIZE ); } #ifdef BDB_IDL_MULTI if( i == BDB_DN2ID ) { @@ -252,8 +257,6 @@ bdb_db_open( BackendDB *be ) bdb_bt_compare ); } #endif - rc = db->bdi_db->set_pagesize( db->bdi_db, BDB_PAGESIZE ); - rc = db->bdi_db->open( db->bdi_db, bdbi_databases[i].file, /* bdbi_databases[i].name, */ NULL, -- 2.39.5