mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Yannick Lecaillez
01.39.2015 7a7824c45f9d392827cd931fa11a1c071cef218b
OPENDJ-2189: Empty EntryIDSet are kept rather than deleted.
2 files modified
8 ■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DefaultIndex.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VerifyJob.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DefaultIndex.java
@@ -236,13 +236,12 @@
        if (oldValue != null)
        {
          EntryIDSet entryIDSet = computeEntryIDSet(key, oldValue.toByteString(), deletedIDs, addedIDs);
          ByteString after = toValue(entryIDSet);
          /*
           * If there are no more IDs then return null indicating that the record should be removed.
           * If index is not trusted then this will cause all subsequent reads for this key to
           * return undefined set.
           */
          return after.isEmpty() ? null : after;
          return entryIDSet.size() == 0 ? null : toValue(entryIDSet);
        }
        else if (trusted)
        {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VerifyJob.java
@@ -684,6 +684,11 @@
        try
        {
          entryIDSet = cursor.getValue();
          if (entryIDSet.size() == 0)
          {
            errorCount++;
            logger.trace("Empty ID list: %n%s", keyDump(index.toString(), key));
          }
        }
        catch (Exception e)
        {