[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: dbcachenowsync
> Hi
>
> I'm am building an ldap based application where an administrator needs to do
> updates to the ldap data from time to time. Some of the data consists of
> pretty long textstrings that are indexed using the sub index. The Ldap
> server therefore takes a long time to update an entry, sometimes several
> minutes. In order to reduce that time I added the dbcachenowsync flag to the
> slapd.conf. However, as I understand it, that means that the updated data is
> kept in memory and not written to disk, and therefore lost in case the
> server goes down. I therefore would like to know how I can force the new
> data to be written to disk, say once a day.
>
> Thanks in advance for any advice.
>
> ../Tonny
>
>
I extended my OpenLDAP 1.2.11 adding a thread that gets started at the
same time the daemon thread is started, and adds a flag to detect when
changes are made. Once a change is made, it waits until there are no
active threads and then synchronizes the database. It is hard-coded
to check every 60 seconds. This was a solution to solve the very
problem you describe. If you are using 1.2.11, I can put a patch
file up somewhere. If you are talking about 2.0, then it would have
to be re-written some. It seems to work very well, giving me the
performance of dbcachenowsync, while flushing the database when the
server is not too busy. So the question is, what version are you
using?
Randy