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

matthew_swift
20.32.2009 844cd8ffd849002b9881e7c047105569d8288809
Fix issue 3833: corrupt index in a replication topology

Replace use of HashMap with TreeMap in order to handle byte[] keys.
1 files modified
5 ■■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/Index.java 5 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/Index.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.backends.jeb;
@@ -1342,7 +1342,8 @@
                          List<Modification> mods)
      throws DatabaseException
  {
    HashMap<byte[], Boolean> modifiedKeys = new HashMap<byte[], Boolean>();
    TreeMap<byte[], Boolean> modifiedKeys =
      new TreeMap<byte[], Boolean>(indexer.getComparator());
    indexer.modifyEntry(oldEntry, newEntry, mods, modifiedKeys);
    for (Map.Entry<byte[], Boolean> modifiedKey : modifiedKeys.entrySet())