681b22b Trac Ticket 2 - If node entries are tombstone'd,

Authored and Committed by nhosoi 12 years ago
32 files changed. 10858 lines added. 13093 lines removed.
Makefile.am
file modified
+2 -1
Makefile.in
file modified
+8 -2
aclocal.m4
file modified
+21 -19
config.h.in
file modified
+6 -0
configure
file modified
+7499 -11450
ldap/admin/src/scripts/81changelog.pl
file modified
+3 -3
ldap/admin/src/scripts/setup-ds.res.in
file modified
+2 -0
ldap/servers/plugins/replication/repl5_replica.c
file modified
+19 -14
ldap/servers/slapd/back-ldbm/back-ldbm.h
file modified
+14 -0
ldap/servers/slapd/back-ldbm/dbversion.c
file modified
+2 -1
ldap/servers/slapd/back-ldbm/dn2entry.c
file modified
+19 -7
ldap/servers/slapd/back-ldbm/findentry.c
file modified
+34 -12
ldap/servers/slapd/back-ldbm/id2entry.c
file modified
+5 -2
ldap/servers/slapd/back-ldbm/import-threads.c
file modified
+7 -2
ldap/servers/slapd/back-ldbm/import.c
file modified
+2 -1
ldap/servers/slapd/back-ldbm/import.h
file modified
+1 -0
ldap/servers/slapd/back-ldbm/index.c
file modified
+18 -3
ldap/servers/slapd/back-ldbm/ldbm_add.c
file modified
+3 -2
ldap/servers/slapd/back-ldbm/ldbm_config.h
file modified
+1 -1
ldap/servers/slapd/back-ldbm/ldbm_delete.c
file modified
+72 -44
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
file modified
+259 -94
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
file modified
+5 -3
ldap/servers/slapd/back-ldbm/ldif2ldbm.c
file modified
+29 -12
ldap/servers/slapd/back-ldbm/misc.c
file modified
+1 -0
ldap/servers/slapd/back-ldbm/parents.c
file modified
+104 -37
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
file modified
+4 -0
ldap/servers/slapd/dn.c
file modified
+63 -6
ldap/servers/slapd/modutil.c
file modified
+3 -3
ldap/servers/slapd/slapi-plugin.h
file modified
+48 -0
ldap/servers/slapd/tools/dbscan.c
file modified
+3 -3
lib/libaccess/lasip.cpp
file modified
+2 -2
ltmain.sh
file modified
+2599 -1369
    Trac Ticket 2 - If node entries are tombstone'd,
                    subordinate entries fail to get the full DN.
    
    https://fedorahosted.org/389/ticket/2
    
    Related Bugs:
    Bug 736431 - parent tombstone entry could be reaped even if its child
                 tombstone entries still exist
    Bug 767024 - MMR: when a subtree is deleted and the backend is exported
                 with -r, importing the ldif fails
    
    Fix Descriptions:
    - The key format of entryrdn index has been modified to allow traversing
      tombstoned node entries.
      old key format:
        [PC]entryID: <rdn> (nsuniqueid=<UNIQUEID>,<rdn>)
      new key format:
        [PC]entryID
      To traverse the DIT on entryrdn, rdn's are not needed.  Just using
      entryID should work.  Also, the rdn strings are stored in the entryrdn
      value.  Thus, this key format change eliminates the redundancy.
      The main motivation of the change: a tombstone entry has a DN format
      "nsuniqueid=<UNIQUEID>,<original_dn>".  If any of the ancestor entries
      of the tombstone entry were trying to get the full DN using entryrdn,
      there was no way to figure out the node's nsuniqueid from the leaf DN.
      That is, once an entire subtree was deleted, the leaf entries lost the
      ability to get the full DN using the entryrdn index.  This fix makes
      entryrdn to regain it.
    
    - Once an entry has become a tombstone entry, ordinary operation such
      as search does not expect the entry is returned.  But it is needed
      when reaping the tombstone entries.  To support the 2 conflicting
      requirements, a flag TOMBSTONE_INCLUDED is added.  Passing the flag
      to dn2entry_ext, it returns the tombstoned entry.
      Also, there could be an entry which rdn attribute is nsuniqueid,
      but is not a tombstone entry.  To support such a case, a set of
      new get parent APIs, which take a flag ls_tombstone to switch
      between the 2 behaviors.
        slapi_dn_find_parent_ext
        slapi_dn_parent_ext
        slapi_sdn_get_parent_ext
        slapi_sdn_get_backend_parent_ext
    
    - Introduced a system attribute tombstoneNumSubordinates to hold the
      subordinate count of the tombstone'd node.  Once a normal entry is
      turned to be a tombstone entry, it loses the numSubordinates attribute.
      The attribute value is used to determine the normal entry is a leaf
      or a node.  The analogous knowledge is necessary to determine if the
      tomb stone entry can be reaped or not.  TombstoneNumSubordinates has
      been introduced to fulfill the goal.   As long as the tombstoneNum-
      subordinates value is not 0, the tombstone entry won't be reaped.
      The tombstoneNumsubordinates attribute value pair is added/modified
      when the child entries are deleted (note: child entries never be
      added since we don't allow to add a subordinate entry to a tombstone
      entry).  Also, when an ldif file which contains tombstone entries
      is imported, the tombstoneNumSubordinates value is added to a tomb-
      stone node entry in the same way as the numSubordinates is to a normal
      node entry.  To support the new behavior, parentid index is now main-
      tained for the tombstone entries, as well.
    
    - Added an upgrade script: 91subtreereindex.pl to reformat entryrdn
      index file.
    
    - To check the upgrade is needed or not, introduced BDB_RDNFORMAT_VERSION:
      The current version is 1.
      bdb/4.8/libback-ldbm/newidl/rdn-format-1/dn-4514
    
    - Modified an upgrade script 81changelog.pl to force to remove the
      unnecessary changelog related files.
    
        
file modified
+2 -1
file modified
+8 -2
file modified
+21 -19
file modified
+6 -0
file modified
+7499 -11450
file modified
+63 -6
file modified
+3 -3
file modified
+2 -2
file modified
+2599 -1369