https://bugs.openldap.org/show_bug.cgi?id=9920
--- Comment #28 from kero renault.cle@gmail.com --- Thank you Howard for the patch,
Indeed, it is much better. I can now use different auth data buffer sizes. But it is still broken in all sorts of ways when I try to read simultaneously as I write in the database. My numerous tries ended in the following:
- MDB_BAD_DBI: So I decided to try to reopen the databases on the writing thread even though it was already created with a write transaction and committed on the main thread (the one opening the env). - MDB_BAD_TXN: Transaction must abort, has a child, or is invalid. - MDB_PAGE_NOTFOUND: Requested page not found. - MDB_CRYPTO_FAIL: Page encryption or decryption failed.
Note that all these errors ONLY happen when I try to read the database while writing it in another thread. I run multiple (10) threads that block/wait to open a new write transaction. If I DO NOT perform ANY read while writing, every read or write attempt on the write transaction performs successfully.
When I write from the main thread without reading at the same time, everything works perfectly — at least as far as I tested. It blocks my program, so that's not a perfect situation, but I can open and read in the environment, and I don't have to open/create the databases twice.