[Date Prev][Date Next]
RE: slapadd(8), database order
> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> Maybe the thing to do is:
> a) have back-bdb check for existance of parents
> b) provide an LDIF ordering tool
> or, provide a ID defragmentation tool :-).
Well, since we have transactions, it would be possible to do this cleanly. We
would need a dn2id index sorted in tree order first, and it would have to
rewrite the entire id2entry database. What a hellish job, you would only run
into this problem and need the tool because the database has gotten huge, and
so this would be a very intensive amount of work. You could do it without
taking down slapd if you turn off entry caching and attribute indexing while
it runs. It would be a major pig.
You still need the dn2id index in tree order, but you could add an option to
slapcat to dump the database in dn2id order instead of id2entry order. Then a
defrag means slapcat/slapadd, making an entirely new copy of the database.
Much easier to implement, but it needs 2x the disk space.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support