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

Seemingly broken database



Hi,

I have a large database with several million entries, which for a few specific entries takes very long (several minutes) to search.

Looking at the debug output the search suddenly goes into a mode where it tests a lot of completely irrelevant entries and outputs a lot of "bdb_search: <number> scope not okay" messages - which takes very long time before the query ends.

I've tried deleting all indexes and re-indexing with slapdindex, but the problem persists - also with 2.4.28.
It's BDB 4.8.26 with back_bdb.

However... loading the entire database with slapadd made the problem go away. So I suspect the id2entry or dn2id database is broken.

So now I'm wondering... how do these situations occur and is there anyway to fix the database without reloading. It takes several hourse to reload, so it's not an ideal situation to have to do that every time such an event occurs. They are rather rare compared to the total number of entries, but they pop up once in a while, so it'll be a rutine job to start the database over from ldif, if that's the solution.

Is there any tool to inspect the BDB database, find the problem, fix it and re-index?

/Peter