From 9fad71dc9be4ce902b96536b30609b56b2f9da9e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 11 Aug 2002 00:30:46 +0000 Subject: [PATCH] Never use DB_RECOVER flag when opening DB_ENV. Recovery must be done manually. Automatic recovery would interfere with gentlehup restarts. --- servers/slapd/back-bdb/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index ccf50818e6..8fa83ec16b 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -205,10 +205,13 @@ bdb_db_open( BackendDB *be ) flags = DB_INIT_MPOOL | DB_THREAD | DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN; - /* Only slapd will do recovery, slap-tools won't. Otherwise - * running slapcat while slapd is active corrupts the db. +#if 0 + /* Never do automatic recovery, must perform it manually. + * Otherwise restarting with gentlehup will corrupt the + * database. */ if( !(slapMode & SLAP_TOOL_MODE) ) flags |= DB_RECOVER; +#endif bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0].bv_val ); bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall ); -- 2.39.5