]> git.sur5r.net Git - openldap/commitdiff
Prevent ldbm_sync from being called by ldbm_cache_close when the new
authorRandy Kunkee <kunkee@openldap.org>
Mon, 16 Jul 2001 23:21:36 +0000 (23:21 +0000)
committerRandy Kunkee <kunkee@openldap.org>
Mon, 16 Jul 2001 23:21:36 +0000 (23:21 +0000)
dbsync configuration is in use, which was preventing the performance
gains of this mode.

servers/slapd/back-ldbm/config.c
servers/slapd/back-ldbm/dbcache.c

index f374f34641c053a7563073d3909d8f44cb716ddc..70f543e4e84000b6dc00e9d176d88b10e2652f91 100644 (file)
@@ -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);
index ef86d83a3395d502655643d7afd4a6592bbb38e8..fb6472e5257dee141c52dcbf022d48b8ab567d42 100644 (file)
@@ -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;