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

boli
02.41.2007 e117044206787810309294cf77ff254134883481
Fixed a typo for the max block size attribute in the VLV index configuration

Fixed issue 2045. The import will delete the database files if only one base DN is used with the backend being imported instead of calling the
JE clear method.
3 files modified
21 ■■■■ changed files
opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java 5 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/VLVIndex.java 14 ●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml
@@ -187,7 +187,7 @@
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="vlv-index-sorted-set-capacity"
  <adm:property name="vlv-index-maximum-block-size"
                mandatory="false"
                multi-valued="false"
                read-only="true">
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -1080,11 +1080,12 @@
        envConfig.setConfigParam("je.env.isLocking", "true");
        envConfig.setConfigParam("je.env.runCheckpointer", "false");
      }
      else if(importConfig.clearBackend())
      else if(importConfig.clearBackend() || cfg.getBackendBaseDN().size() <= 1)
      {
        // We have the writer lock on the environment, now delete the
        // environment and re-open it. Only do this when we are
        // importing to all the base DNs in the backend.
        // importing to all the base DNs in the backend or if the backend only
        // have one base DN.
        File backendDirectory = getFileForPath(cfg.getBackendDirectory());
        EnvManager.removeFiles(backendDirectory.getPath());
opends/src/server/org/opends/server/backends/jeb/VLVIndex.java
@@ -150,7 +150,7 @@
    this.config = config;
    this.baseDN = config.getVLVIndexBaseDN();
    this.scope = SearchScope.valueOf(config.getVLVIndexScope().name());
    this.sortedSetCapacity = config.getVLVIndexSortedSetCapacity();
    this.sortedSetCapacity = config.getVLVIndexMaximumBlockSize();
    this.id2entry = entryContainer.getID2Entry();
    try
@@ -1323,15 +1323,15 @@
    }
    // Update sort set capacity only if changed.
    if(config.getVLVIndexSortedSetCapacity() !=
        cfg.getVLVIndexSortedSetCapacity())
    if(config.getVLVIndexMaximumBlockSize() !=
        cfg.getVLVIndexMaximumBlockSize())
    {
      this.sortedSetCapacity = cfg.getVLVIndexSortedSetCapacity();
      this.sortedSetCapacity = cfg.getVLVIndexMaximumBlockSize();
      // Require admin action only if the new capacity is larger. Otherwise,
      // we will lazyly update the sorted sets.
      if(config.getVLVIndexSortedSetCapacity() <
          cfg.getVLVIndexSortedSetCapacity())
      if(config.getVLVIndexMaximumBlockSize() <
          cfg.getVLVIndexMaximumBlockSize())
      {
        adminActionRequired = true;
      }
@@ -1361,7 +1361,7 @@
    // Update the sort order only if changed.
    if(!config.getVLVIndexSortOrder().equals(
        cfg.getVLVIndexSortedSetCapacity()))
        cfg.getVLVIndexMaximumBlockSize()))
    {
      String[] sortAttrs = cfg.getVLVIndexSortOrder().split(" ");
      SortKey[] sortKeys = new SortKey[sortAttrs.length];