From b6644c452624e2de72d7ddf37b1603de887a26a0 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 21 Jan 2008 12:10:39 +0000
Subject: [PATCH] Fix issues 2831 and 1948.

---
 opends/src/server/org/opends/server/backends/jeb/VLVIndexMergeThread.java |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/VLVIndexMergeThread.java b/opends/src/server/org/opends/server/backends/jeb/VLVIndexMergeThread.java
index 13ecd66..85d4664 100644
--- a/opends/src/server/org/opends/server/backends/jeb/VLVIndexMergeThread.java
+++ b/opends/src/server/org/opends/server/backends/jeb/VLVIndexMergeThread.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2008 Sun Microsystems, Inc.
  */
 package org.opends.server.backends.jeb;
 import org.opends.messages.Message;
@@ -51,7 +51,7 @@
  * A thread to merge a set of intermediate files from an vlvIndex builder
  * into an vlvIndex database.
  */
-public class VLVIndexMergeThread extends DirectoryThread
+class VLVIndexMergeThread extends DirectoryThread
 {
   /**
    * The tracer object for the debug logger.
@@ -67,23 +67,18 @@
   /**
    * The configuration of the JE backend containing the vlvIndex.
    */
-  LocalDBBackendCfg config;
+  private LocalDBBackendCfg config;
 
   /**
    * The LDIF import configuration, which indicates whether we are
    * appending to existing data.
    */
-  LDIFImportConfig ldifImportConfig;
+  private LDIFImportConfig ldifImportConfig;
 
   /**
    * The vlvIndex database being written.
    */
-  VLVIndex vlvIndex;
-
-  /**
-   * The name of the vlvIndex for use in file names and log messages.
-   */
-  String indexName;
+  private VLVIndex vlvIndex;
 
   /**
    * Indicates whether we are replacing existing data or not.
@@ -121,7 +116,7 @@
    * whether we are appending to existing data.
    * @param vlvIndex The vlvIndex database to be written.
    */
-  VLVIndexMergeThread(LocalDBBackendCfg config,
+  public VLVIndexMergeThread(LocalDBBackendCfg config,
                       LDIFImportConfig ldifImportConfig,
                       VLVIndex vlvIndex)
   {
@@ -170,7 +165,8 @@
   public void merge() throws Exception
   {
     // Open all the files.
-    File tempDir = getFileForPath(config.getImportTempDirectory());
+    File parentDir = getFileForPath(config.getImportTempDirectory());
+    File tempDir = new File(parentDir, config.getBackendId());
     File[] files = tempDir.listFiles(filter);
 
     if (files == null || files.length == 0)

--
Gitblit v1.10.0