Current format
dn: nsuniqueid=<UNIQID>+<RDN>,<PARENTDN>
<attr>: <value>
[...]
nsds5ReplConflict: namingConflict <DN>
proposing format (internal; Slapi_Entry)
dn: <RDN>,<PARENTDN>
objectclass: nsConflict
<attr>: <value>
[...]
nsdsEntryType: 1
nsds5ReplConflict: namingConflict <DN>
proposing format (external; search result/exported)
dn: nsuniqueid=<UNIQID>+<RDN>,<PARENTDN>
objectclass: nsConflict
<attr>: <value>
[...]
nsdsEntryType: 1
nsds5ReplConflict: namingConflict <DN>
current format
dn: nsuniqueid=<UNIQID>,<RDN>,<PARENTDN>
objectclass: nsTombstone
<attr>: <value>
[...]
proposing format (internal; Slapi_Entry)
dn: <RDN>,<PARENTDN>
objectclass: nsTombstone
<attr>: <value>
[...]
nsdsEntryType: 2
proposing format (external; search result/exported)
dn: nsuniqueid=<UNIQID>,<RDN>,<PARENTDN>
objectclass: nsTombstone
<attr>: <value>
[...]
nsdsEntryType: 2
dn: <RDN>,<PARENTDN>
<attr>: <value>
[...]
The system attribute nsdsEntryType is single-valued and integer. The motivation to have this system attribute is speeding up the entry type checking especially for the search-all “(objectclass=*)” case. We have the type info in the objectclass with the string value “nsConflict/nsTombstone”. But checking the type using the string would be much slower than checking the integer value.
An entry could be a conflict and a tombstone entry at the same time. The entry would look like this and the RDN list is both in the conflict_entryrdn and tombstone_entryrdn.
dn: <RDN>,<PARENTDN>
objectclass: nsConflict
objectclass: nsTombstone
<attr>: <value>
[...]
nsdsEntrytype: 3 <== 1 | 2
nsds5ReplConflict: namingConflict <DN>
case 1
BaseDN: ”nsuniqueid=
If ‘-r’ is added to the command line, conflict / tombstone entries are exported. The DN contains the special “nsuniqueid=
Support the current ldif (no objectClass: nsConflict; no nsdsEntryType) as well as the new ldif.
By setting “nsslapd-subtree-rename-switch: off” in cn=config, we could go back to the entrydn indexing. We have to introduce extra index files: conflict_entrydn and tombstone_entrydn, as well.
To support the multiple conflict / tombstone entries having the same original DN, we allow entries having the same RDN and parentid in id2entry. (Note: the conflict / tombstone entries only)
dbscan -f id2entry.db output
id N
rdn: <RDN>
nsuniqueid: <UNIQID_N>
parentid: M
entryid: N
id N+1
rdn: <RDN>
nsuniqueid: <UNIQID_N+1>
parentid: M
entryid: N+1
Plus conflict_/tombstone_entryrdn should be able to store a list of entryids instead of one. (Again, this is only for the conflict/tombstone entries.)
conflict entry
dn: <RDN>,<PARENTDN>,<CONFLICTSUFFIX>
objectclass: nsConflict
<attr>: <value>
[...]
entrytype: 1
tombstone entry
dn: <RDN>,<PARENTDN>,<TOMBSTONESUFFIX>
objectclass: nsTombstone
<attr>: <value>
[...]
entrytype: 2
Comments on this approach
- Adding the conflict / tombstone entry looks like a move in DIT, but it is not a move in terms of DN (since the original
itself is not moved to or , but a delete + add.TOMBSTONESUFFIX>CONFLICTSUFFIX>SUFFIX> - ldbm_entryrdn code needs to have a knowledge about the special suffixes; currently, it only takes one “suffix”.
- One entryrdn index file instead of 3 (entryrdn, conflict_entryrdn, tombstone_entryrdn).
- Search with -b “
” / ” ” is executed on multiple backends if there are multiple.TOMBSTONESUFFIX>CONFLICTSUFFIX>
Ticket #160 – Make replication plugin put conflicts and tombstones in a special suffix Bug 695797 - Invalid host record created during client enrollment with failover Bug 747701 - [RFE] Make replication plugin put conflicts in a special suffix Bug 772294 - Replication conflicts resolution