From: Randy Kunkee Date: Mon, 16 Jul 2001 23:21:36 +0000 (+0000) Subject: Prevent ldbm_sync from being called by ldbm_cache_close when the new X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1228 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=82f3004a16687005e45a0cc3f46e0549c87ea0df;p=openldap Prevent ldbm_sync from being called by ldbm_cache_close when the new dbsync configuration is in use, which was preventing the performance gains of this mode. --- diff --git a/servers/slapd/back-ldbm/config.c b/servers/slapd/back-ldbm/config.c index f374f34641..70f543e4e8 100644 --- a/servers/slapd/back-ldbm/config.c +++ b/servers/slapd/back-ldbm/config.c @@ -145,6 +145,9 @@ ldbm_back_db_config( li ->li_dbsyncwaitinterval = i; } + /* turn off writesync when sync policy is in place */ + li->li_dbwritesync = 0; + #else Debug( LDAP_DEBUG_ANY, "\"dbsync\" policies not supported in non-threaded environments\n", 0, 0, 0); diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index ef86d83a33..fb6472e525 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -46,7 +46,7 @@ ldbm_cache_open( flags |= LDBM_NOLOCKING; } - if( li->li_dbwritesync && li->li_dbsyncfreq == 0) { + if( li->li_dbwritesync ) { flags |= LDBM_SYNC; } else { flags |= LDBM_NOSYNC;