mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
mdb_db_close() should not force env_sync in quick mode
This commit is contained in:
parent
9297050f9e
commit
65b5ff2de3
@ -279,13 +279,17 @@ mdb_db_close( BackendDB *be, ConfigReply *cr )
|
||||
|
||||
mdb_txn_abort( txn );
|
||||
|
||||
/* force a sync */
|
||||
rc = mdb_env_sync( mdb->mi_dbenv, 1 );
|
||||
if( rc != 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"mdb_db_close: database \"%s\": "
|
||||
"mdb_env_sync failed: %s (%d).\n",
|
||||
be->be_suffix[0].bv_val, mdb_strerror(rc), rc );
|
||||
/* force a sync, but not if we were ReadOnly,
|
||||
* and not in Quick mode.
|
||||
*/
|
||||
if (!(slapMode & (SLAP_TOOL_QUICK|SLAP_TOOL_READONLY))) {
|
||||
rc = mdb_env_sync( mdb->mi_dbenv, 1 );
|
||||
if( rc != 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"mdb_db_close: database \"%s\": "
|
||||
"mdb_env_sync failed: %s (%d).\n",
|
||||
be->be_suffix[0].bv_val, mdb_strerror(rc), rc );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user