OPENDJ-2189: Empty EntryIDSet are kept rather than deleted.
| | |
| | | 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) |
| | | { |
| | |
| | | try |
| | | { |
| | | entryIDSet = cursor.getValue(); |
| | | if (entryIDSet.size() == 0) |
| | | { |
| | | errorCount++; |
| | | logger.trace("Empty ID list: %n%s", keyDump(index.toString(), key)); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |