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

Yannick Lecaillez
12.37.2015 5eae932a06ff0e531f02ba1cc31d72c37bfc7d9c
OPENDJ-2136: Add a configuration option for checkpoint interval in PDB
2 files modified
26 ■■■■■ changed files
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PDBBackendConfiguration.xml 25 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java 1 ●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PDBBackendConfiguration.xml
@@ -246,4 +246,29 @@
          </ldap:attribute>
      </adm:profile>
  </adm:property>
  <adm:property name="db-checkpoint-interval" advanced="true">
      <adm:synopsis>
        Checkpoint interval in seconds
      </adm:synopsis>
      <adm:description>
        This setting controls the elapsed time between attempts to write
        a checkpoint to the journal. A longer interval allows more updates
        to accumulate in buffers before they are required to be written to
        disk, but also potentially causes recovery from an abrupt termination
        (crash) to take more time.
      </adm:description>
      <adm:default-behavior>
          <adm:defined>
              <adm:value>15</adm:value>
          </adm:defined>
      </adm:default-behavior>
      <adm:syntax>
          <adm:size lower-limit="0" />
      </adm:syntax>
      <adm:profile name="ldap">
          <ldap:attribute>
              <ldap:name>ds-cfg-db-checkpoint-interval</ldap:name>
          </ldap:attribute>
      </adm:profile>
  </adm:property>
</adm:managed-object>
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java
@@ -693,6 +693,7 @@
    final Configuration dbCfg = new Configuration();
    dbCfg.setLogFile(new File(backendDirectory, VOLUME_NAME + ".log").getPath());
    dbCfg.setJournalPath(new File(backendDirectory, JOURNAL_NAME).getPath());
    dbCfg.setCheckpointInterval(config.getDBCheckpointInterval());
    dbCfg.setVolumeList(asList(new VolumeSpecification(new File(backendDirectory, VOLUME_NAME).getPath(), null,
        BUFFER_SIZE, 4096, Long.MAX_VALUE / BUFFER_SIZE, 2048, true, false, false)));
    final BufferPoolConfiguration bufferPoolCfg = getBufferPoolCfg(dbCfg);