From 1ac4df71c9fee44d32e3ba4decc3de264bb5bb3d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 4 May 2005 06:41:39 +0000 Subject: [PATCH] ITS#3703 skip checkpoint on close if ReadOnly mode --- servers/slapd/back-bdb/init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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, -- 2.39.5