]> git.sur5r.net Git - openldap/commitdiff
Never use DB_RECOVER flag when opening DB_ENV. Recovery must be done
authorHoward Chu <hyc@openldap.org>
Sun, 11 Aug 2002 00:30:46 +0000 (00:30 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 11 Aug 2002 00:30:46 +0000 (00:30 +0000)
manually. Automatic recovery would interfere with gentlehup restarts.

servers/slapd/back-bdb/init.c

index ccf50818e629c48ff90e903771b19d29921d1509..8fa83ec16b5d99678e60a39a5e92bfdc561db552 100644 (file)
@@ -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 );