[Date Prev][Date Next] [Chronological] [Thread] [Top]

Inconsistent fsync()ing with "dbnosync" in slapd.conf with DB3 backend



Hi,

to improve the response time in an application I've decided to use
the "dbnosync" option in slapd.conf for the ldbm-database I'm accessing
via OpenLDAP (2.0.6). This works well for add requests, but does not
influence deletes. Having a look at libraries/libldbm/ldbm.c I've noticed
the following unconditional sync in ldbm_delete on line 420:

> ldbm_delete( LDBM ldbm, Datum key )
> {
> ...
>         (*ldbm->sync)( ldbm, 0 );
> ...
> }

In ldbm_store the sync only happens when the LDBM_SYNC flag is passed
in via the flags argument. LDBM_SYNC happens to be 0 all the time if I
understand include/ldbm.h correctly.

When I read servers/slapd/back-ldbm, I have the impression that syncing
has moved to files in this directory? So are the syncs in libraries/libldbm
ancient code or are they still needed?

Little confused,
Enrik