back-ldbm in HEAD appears to be rather unstable at the moment, and I'm
afraid that my changes in connection management are part of the problem.
I notice that if I turn the debug level up high, test002 fails. Looking
at the slapd.1.log, it appears that Add operations are still in progress
when the final ldapsearch is done to retrieve the full database contents.
This is really puzzling, it means that the ldapadd command exited
successfully already, but the operations it submitted hadn't completed
yet. With lower debug levels, the Adds complete quickly enough to finish
before the ldapsearch finishes. Otherwise, one to three entries from the
tail of the Add are missing from the search result.
This also seems to be causing test008 to fail. Also in test008, there is
garbage text appearing in the LDAP error text fields. I don't know what
it's leftover from...
The big problem here seems to be that back-ldbm calls send_ldap_result()
to tell the client its status before it actually finishes its internal
operations. So it can be in the middle of completing a cache update by
the time a new request arrives; this seems to explain what I'm seeing in
test002 at least.