From: Howard Chu Date: Sun, 11 Aug 2002 00:30:46 +0000 (+0000) Subject: Never use DB_RECOVER flag when opening DB_ENV. Recovery must be done X-Git-Tag: NO_SLAP_OP_BLOCKS~1242 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9fad71dc9be4ce902b96536b30609b56b2f9da9e;p=openldap Never use DB_RECOVER flag when opening DB_ENV. Recovery must be done manually. Automatic recovery would interfere with gentlehup restarts. --- 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 );