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.
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb.importLDIF; |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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) |