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

Matthew Swift
12.48.2015 816662b8418538b7cccefb1fe2d7aff77f66be69
Additional fix for OPENDJ-2136: Add a configuration option for checkpoint interval in PDB

* use duration syntax for property
* add upper/lower bounds enforced by Persistit
* add correct LDAP schema.

3 files modified
43 ■■■■ changed files
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PDBBackendConfiguration.xml 38 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/schema/02-config.ldif 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java 2 ●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PDBBackendConfiguration.xml
@@ -246,29 +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>
  <adm:property name="db-checkpointer-wakeup-interval" advanced="true">
    <adm:synopsis>
      Specifies the maximum length of time that may pass between checkpoints.
    </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:description>
    <adm:default-behavior>
      <adm:defined>
        <adm:value>15s</adm:value>
      </adm:defined>
    </adm:default-behavior>
    <adm:syntax>
      <adm:duration base-unit="s" lower-limit="10" upper-limit="3600" />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-db-checkpointer-wakeup-interval</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opendj-server-legacy/resource/schema/02-config.ldif
@@ -5764,7 +5764,8 @@
        ds-cfg-db-cache-size $
        ds-cfg-db-txn-no-sync $
        ds-cfg-disk-full-threshold $
        ds-cfg-disk-low-threshold )
        ds-cfg-disk-low-threshold $
        ds-cfg-db-checkpointer-wakeup-interval )
  X-ORIGIN 'OpenDJ Directory Server' )
objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.24
  NAME 'ds-cfg-backend-index'
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java
@@ -693,7 +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.setCheckpointInterval(config.getDBCheckpointerWakeupInterval());
    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);