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

Ludovic Poitou
13.54.2011 1c2cf17a5ca4c1d73bb6b03e37a2e0bc02810ec7
Fix OPENDJ-380:  index-entry-limit=0 not working as expected.
While setting unlimited index size is not a best practice, it should work as expected. A value of 0, means there is no limit to any index.
2 files modified
16 ■■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/importLDIF/ImportIDSet.java 9 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/importLDIF/ImportIDSet.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.backends.jeb.importLDIF;
@@ -79,7 +80,15 @@
  public ImportIDSet(int size, int limit, boolean doCount)
  {
    this.array = new long[size + 128];
    // A limit of 0 means unlimited.
    if (limit == 0)
    {
      this.limit = Integer.MAX_VALUE;
    }
    else
    {
    this.limit = limit;
    }
    this.doCount = doCount;
  }
opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
@@ -3059,8 +3059,15 @@
      this.bufferIndexFile = new File(tempDir, bufferIndexFileName);
      this.isDN = isDN;
      if (limit > 0)
      {
      this.limit = limit;
    }
      else
      {
        this.limit = Integer.MAX_VALUE;
      }
    }
    private void setIndexDBWriteTask(IndexDBWriteTask writer)