From: Howard Chu Date: Wed, 4 May 2005 06:41:39 +0000 (+0000) Subject: ITS#3703 skip checkpoint on close if ReadOnly mode X-Git-Tag: OPENLDAP_AC_BP~750 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ac4df71c9fee44d32e3ba4decc3de264bb5bb3d;p=openldap ITS#3703 skip checkpoint on close if ReadOnly mode --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 21c4985d8f..84ecfe3087 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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,