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

matthew_swift
15.08.2009 afaa2b0b0a24286830f856365da6fd3ef04ca069
Fix issue 4231: Import-ldif fails to import 6M entries

Switch to hierarchical eviction policy using 128 nodes per scan. This improves dn validation when done in first phase and also seems to improve second phase performance under some circumstances (including the use-case described in the issue).

Also display runtime information at start up rather than later after import starts.
2 files modified
6 ■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java 5 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java 1 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -56,6 +56,7 @@
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.SearchOperation;
import org.opends.server.util.LDIFException;
import org.opends.server.util.RuntimeInformation;
import org.opends.server.util.Validator;
import static org.opends.server.util.StaticUtils.*;
@@ -1092,6 +1093,8 @@
  public LDIFImportResult importLDIF(LDIFImportConfig importConfig)
      throws DirectoryException
  {
    RuntimeInformation.logInfo();
    // If the backend already has the root container open, we must use the same
    // underlying root container
    boolean openRootContainer = rootContainer == null;
@@ -1130,6 +1133,8 @@
      envConfig.setTxnNoSync(false);
      envConfig.setConfigParam("je.env.isLocking", "true");
      envConfig.setConfigParam("je.env.runCheckpointer", "false");
      envConfig.setConfigParam("je.evictor.lruOnly", "false");
      envConfig.setConfigParam("je.evictor.nodesPerScan", "128");
      Importer importer = new Importer(importConfig, cfg);
      importer.initialize(envConfig);
      rootContainer = initializeRootContainer(envConfig);
opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
@@ -479,7 +479,6 @@
      logError(message);
      message = NOTE_JEB_IMPORT_THREAD_COUNT.get(threadCount);
      logError(message);
      RuntimeInformation.logInfo();
      initializeSuffixes();
      long startTime = System.currentTimeMillis();
      processPhaseOne();