From e4f4b6be26cc47d382549bfbf7785b179256917b Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 01 Aug 2007 22:41:18 +0000
Subject: [PATCH] Fixed a typo for the max block size attribute in the VLV index configuration

---
 opendj-sdk/opends/src/server/org/opends/server/backends/jeb/VLVIndex.java                |   14 +++++++-------
 opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java             |    5 +++--
 opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml |    2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml b/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml
index 9e3334c..b394e01 100644
--- a/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/VLVJEIndexConfiguration.xml
+++ b/opendj-sdk/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">
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
index aabc606..007f66e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
+++ b/opendj-sdk/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());
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/VLVIndex.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/VLVIndex.java
index ee1aa41..32eb41a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/VLVIndex.java
+++ b/opendj-sdk/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];

--
Gitblit v1.10.0