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

Re: Index corruption



Christine,

I have experienced this problem under Solaris 2.7 using DB-3.2.9 and Openldap 2.0.11. The index would always get corrupted and there will be missing entries and "cached" entries or entries that you remove and ldap logs that the entries are removed but they still appear in your searches. Unfortunately the only option I had was to upgrade to Openldap-2.0.18 and DB-3.3 and that solved the problem. Check the DB version you're using. I'm not sure if 2.0.22 requires DB4 but you may considering downgrading on a development ldap server and see how well that works. Also run in against a battery of adds/deletes using a looping shell/perl script and shut down your ldap server every so often. At least that's what I did when I was trying to get this to work. Finally you may consider searching the old ldap messages because I think I reposted my "solution" (there was none ... other than to upgrade)

Hope that helps.

jm

At 01:22 PM 3/12/2002 +1100, you wrote:
Hi all,

We are running 2.0.22 under FreeBSD 4.5.  This morning my
indexes got corrupted in an interesting manner, so that
the directory believed it had a record which didn't actually
exist.

I found one other case rather like it in the archives, but
no real explanation.

I tried to add a very simple posixAccount record:

dn: uid=chris3,dc=au,dc=cordoors,dc=com
objectClass: posixAccount
uidNumber: 1946
gidNumber: 400
homeDirectory: /usr/users/chris
loginShell: /bin/tcsh
gecos: Chris Robertson
cn: Chris Robertson
uid: chris3
userPassword: x

and the add failed with a "record already exists" message.
Tried to delete the DN, and got the following message:

 Delete Result: Unknown error (80)
 Additional info: DN index delete failed

I tried adding a similar record with uid=chris4, and
had no problems adding it or deleting it again.

I dumped the directory with slapcat, and the uid=chris3
record definitely didn't exist.  I shut down slapd
and re-made the indexes; no change.  I physically
removed the indexes and re-made them; no change.
I deleteled almost every record from the directory and
re-made the indexes; no change.

The only thing that worked was removing the whole damn
directory and re-creating it from scratch with slapadd.

Can anyone shed any light on this?  I'm not aware of
anything out of the ordinary happening around the time
the indexes got munched.

--Chris Robertson
Corinthian Engineering