ITS#3703 skip checkpoint on close if ReadOnly mode

This commit is contained in:
Howard Chu 2005-05-04 06:41:39 +00:00
parent 6a2d53f396
commit 1ac4df71c9

View File

@ -582,8 +582,10 @@ bdb_db_close( BackendDB *be )
/* close db environment */
if( bdb->bi_dbenv ) {
/* force a checkpoint */
if ( !( slapMode & SLAP_TOOL_QUICK )) {
/* force a checkpoint, but not if we were ReadOnly,
* and not in Quick mode since there are no transactions there.
*/
if ( !( slapMode & ( SLAP_TOOL_QUICK|SLAP_TOOL_READONLY ))) {
rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,