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

boli
15.23.2006 cd7c40541ea5f1c17a726f7880ce46df0a67d0d8
Added JE backend configuration option to specify the number of cleaner threads. Default value is 1

Fix for issue 56
4 files modified
34 ■■■■■ changed files
opends/resource/config/config.ldif 1 ●●●● patch | view | raw | blame | history
opends/resource/schema/02-config.ldif 6 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java 15 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/JebMessages.java 12 ●●●●● patch | view | raw | blame | history
opends/resource/config/config.ldif
@@ -194,6 +194,7 @@
ds-cfg-database-txn-no-sync: false
ds-cfg-database-txn-write-no-sync: true
ds-cfg-database-run-cleaner: true
ds-cfg-database-cleaner-num-threads: 1
ds-cfg-database-cleaner-min-utilization: 75
ds-cfg-database-evictor-lru-only: true
ds-cfg-database-evictor-nodes-per-scan: 10
opends/resource/schema/02-config.ldif
@@ -970,6 +970,10 @@
attributeTypes: ( 1.3.6.1.4.1.26027.1.1.283
  NAME 'ds-cfg-account-status-notification-type'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' )
attributeTypes: ( 1.3.6.1.4.1.26027.1.1.284
  Name 'ds-cfg-database-cleaner-num-threads'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE
  X-ORIGIN 'OpenDS Directory Server' )
objectClasses: ( 1.3.6.1.4.1.26027.1.2.1
  NAME 'ds-cfg-access-control-handler' SUP top STRUCTURAL
  MUST ( cn $ ds-cfg-acl-handler-class $ ds-cfg-acl-handler-enabled )
@@ -1006,7 +1010,7 @@
  ds-cfg-database-logging-file-handler-on $ ds-cfg-database-logging-level $
  ds-cfg-database-checkpointer-bytes-interval $
  ds-cfg-database-checkpointer-wakeup-interval $
  ds-cfg-database-lock-num-lock-tables )
  ds-cfg-database-lock-num-lock-tables $ ds-cfg-database-cleaner-num-threads )
  X-ORIGIN 'OpenDS Directory Server' )
objectClasses: ( 1.3.6.1.4.1.26027.1.2.8 NAME 'ds-cfg-je-index' SUP top
  STRUCTURAL MUST ( ds-cfg-index-attribute $ ds-cfg-index-type )
opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
@@ -174,6 +174,13 @@
       ConfigConstants.NAME_PREFIX_CFG + "database-lock-num-lock-tables";
  /**
   * The name of the attribute which configures the number threads
   * allocated by the cleaner for log file processing.
   */
  public static final String ATTR_NUM_CLEANER_THREADS =
       ConfigConstants.NAME_PREFIX_CFG + "database-cleaner-num-threads";
  /**
   * A map of JE property names to their associated configuration attribute.
@@ -202,6 +209,7 @@
  private static final ConfigAttribute CONFIG_ATTR_CHECKPOINTER_BYTES_INTERVAL;
  private static final ConfigAttribute CONFIG_ATTR_CHECKPOINTER_WAKEUP_INTERVAL;
  private static final ConfigAttribute CONFIG_ATTR_NUM_LOCK_TABLES;
  private static final ConfigAttribute CONFIG_ATTR_NUM_CLEANER_THREADS;
@@ -326,6 +334,11 @@
         new IntegerConfigAttribute(ATTR_NUM_LOCK_TABLES, msg, false,
                                    false, true, true, 1, true, 32767);
    msg = getMessage(MSGID_CONFIG_DESCRIPTION_NUM_CLEANER_THREADS);
    CONFIG_ATTR_NUM_CLEANER_THREADS =
         new IntegerConfigAttribute(ATTR_NUM_CLEANER_THREADS, msg, false,
                                    false, false, true, 1, false, 0);
    // Register the parameters that have JE property names.
    registerPropertyAttribute("je.maxMemoryPercent",
                              CONFIG_ATTR_CACHE_PERCENT);
@@ -351,6 +364,8 @@
                              CONFIG_ATTR_CHECKPOINTER_WAKEUP_INTERVAL);
    registerPropertyAttribute("je.lock.nLockTables",
                              CONFIG_ATTR_NUM_LOCK_TABLES);
    registerPropertyAttribute("je.cleaner.threads",
                              CONFIG_ATTR_NUM_CLEANER_THREADS);
    // These parameters do not have JE property names.
    configAttrList.add(CONFIG_ATTR_TXN_NO_SYNC);
opends/src/server/org/opends/server/messages/JebMessages.java
@@ -1213,6 +1213,14 @@
  /**
   * The message ID used to describe the attribute which configures
   * the number of threads allocated by the cleaner for log file processing.
   */
  public static final int MSGID_CONFIG_DESCRIPTION_NUM_CLEANER_THREADS =
       CATEGORY_MASK_CONFIG | SEVERITY_MASK_INFORMATIONAL | 125;
  /**
@@ -1696,5 +1704,9 @@
                    "number of server worker threads.");
    registerMessage(MSGID_JEB_IMPORT_ENVIRONMENT_CONFIG,
                    "Database environment properties: %s.");
    registerMessage(MSGID_CONFIG_DESCRIPTION_NUM_CLEANER_THREADS,
                    "The number of threads allocated by the cleaner for log " +
                    "file processing. If the cleaner backlog becomes large, " +
                    "increase this number.");
  }
}