Emmanuel Lécharny wrote:
Le 17/08/14 17:07, Howard Chu a écrit :
If we encounter an entry later in the LDIF that corresponds to one of
these missing DNs, the search in the RDN index will just return the
entryID we already assigned to it. We then remove the DN from the
missing DN list. The result is that the DB tables and entryIDs are
generated in DN order even if the entries aren't ordered in the LDIF.

The pb with this approach is that you lose the EntryUUID stored in the
LDIF file (typically when you try to bulk load an extract done from a
replica : you want to keep this information).

So create a stub entry with a provisional entryUUID, and overwrite the stub entry with the real entryUUID if you encounter the real entry later. Still far cheaper than multiple passes thru the LDIF file.

We could spare this step if the LDIF file is actually ordered, but there
is no guarantee.


--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Reply via email to