From 82f3004a16687005e45a0cc3f46e0549c87ea0df Mon Sep 17 00:00:00 2001 From: Randy Kunkee Date: Mon, 16 Jul 2001 23:21:36 +0000 Subject: [PATCH] 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. --- servers/slapd/back-ldbm/config.c | 3 +++ servers/slapd/back-ldbm/dbcache.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.5