Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-5406

Duplicate entry DNs if entry is deleted and then added during export-ldif or dsreplication initialize

    Details

    • Epic Link:
    • Story Points:
      2
    • Support Ticket IDs:

      Description

      Reproducible on DS 5.0.0 and 6.0.0.

      The following situation results in duplicate entry DNs:

      • import an LDIF with (say) 2 million entries.
      • start export-ldif or "dsreplication initialize".
      • choose an entry that is located at the beginning of the imported LDIF, e.g. "uid=user.0,ou=people,dc=example,dc=com".
      • while the export-ldif or dsreplication initialize is running, delete the chosen entry (uid=user.0) and immediately add it.

      => The resulting LDIF or newly-initialized replica has two entries with the DN "uid=user.0,ou=people,dc=example,dc=com".

      In the case of an export-ldif, if the resulting LDIF is used in import-ldif, the import will fail:

      [03/Sep/2018:10:48:36 +0800] category=BACKEND severity=ERROR msgID=609 msg=The import has been aborted because the data to be imported contains duplicate copies of entry 'uid=user.0,ou=people,dc=example,dc=com'
      [03/Sep/2018:10:48:39 +0800] category=BACKEND severity=WARNING msgID=535 msg=Due to changes in the configuration, index dc=com,dc=example_aci is currently operating in a degraded state and must be rebuilt before it can be used
      ...
      [03/Sep/2018:10:48:39 +0800] category=BACKEND severity=NOTICE msgID=513 msg=The database backend userRoot containing 0 entries has started

      In the case of "dsreplication initialize", the import fails silently (without errors). The newly-initialized replica backend is reported to have "0 entries":

      [03/Sep/2018:14:31:13 +0800] category=SYNC severity=NOTICE msgID=131 msg=Directory server DS(22909) for domain "dc=example,dc=com" has changed its status to Full update
      [03/Sep/2018:14:31:13 +0800] category=BACKEND severity=NOTICE msgID=370 msg=The backend userRoot is now taken offline
      ...
      [03/Sep/2018:14:32:43 +0800] category=BACKEND severity=NOTICE msgID=532 msg=Processed 1909830 entries, skipped 0 and rejected 0 (recent rate 28358.0/sec)
      [03/Sep/2018:14:32:47 +0800] category=BACKEND severity=NOTICE msgID=523 msg=Index /dc=com,dc=example/telephoneNumber.telephoneNumberMatch phase two started processing 1 buffers in 1 batches
      ...
      [03/Sep/2018:14:32:48 +0800] category=BACKEND severity=NOTICE msgID=526 msg=Import LDIF environment close took 0 seconds
      [03/Sep/2018:14:32:48 +0800] category=BACKEND severity=NOTICE msgID=518 msg=Flushing data to disk
      [03/Sep/2018:14:32:49 +0800] category=BACKEND severity=WARNING msgID=535 msg=Due to changes in the configuration, index dc=com,dc=example_aci is currently operating in a degraded state and must be rebuilt before it can be used
      ...
      [03/Sep/2018:14:32:49 +0800] category=BACKEND severity=NOTICE msgID=513 msg=The database backend userRoot containing 0 entries has started

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fabiop Fabio Pistolesi
                Reporter:
                wei-yee.lum Wei-Yee Lum
                QA Assignee:
                carole forel
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: