From a145657fb67a07960c7d0be1de17966554071eee Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 20 May 2015 14:39:27 +0000
Subject: [PATCH] OPENDJ-2016 Implement new on disk merge import strategy based on storage engine

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java
index 51fe7a0..24bf95b 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java
@@ -35,7 +35,6 @@
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 import org.opends.server.backends.pluggable.AttributeIndex.MatchingRuleIndex;
 import org.opends.server.backends.pluggable.OnDiskMergeBufferImporter.DNCache;
-import org.opends.server.backends.pluggable.spi.ReadableTransaction;
 import org.opends.server.backends.pluggable.spi.StorageRuntimeException;
 import org.opends.server.backends.pluggable.spi.WriteableTransaction;
 import org.opends.server.types.AttributeType;
@@ -47,7 +46,7 @@
  * during and import to support multiple suffixes in a backend. A rebuild
  * index has only one of these instances.
  */
-class Suffix
+final class Suffix
 {
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
@@ -195,16 +194,14 @@
    * It will optionally check the dn2id tree for the dn if the specified
    * cleared backend boolean is {@code true}.
    *
-   * @param txn a non null transaction
    * @param dn The DN to check for.
    * @param dnCache The importer DN cache.
-   * @param clearedBackend Set to {@code true} if the import process cleared the backend before processing.
    * @return {@code true} if the dn is contained in the parent ID, or {@code false} otherwise.
    * @throws StorageRuntimeException If an error occurred searching the DN cache, or dn2id tree.
    * @throws InterruptedException If an error occurred processing the pending map
    */
-  public boolean isParentProcessed(ReadableTransaction txn, DN dn, DNCache dnCache, boolean clearedBackend)
-      throws StorageRuntimeException, InterruptedException {
+  public boolean isParentProcessed(DN dn, DNCache dnCache) throws StorageRuntimeException, InterruptedException
+  {
     synchronized(synchObject) {
       if(parentSet.contains(dn))
       {
@@ -220,9 +217,7 @@
     }
     // Either parent is in the DN cache,
     // or else check the dn2id tree for the DN (only if backend wasn't cleared)
-    final boolean parentThere = dnCache.contains(dn)
-        || (!clearedBackend
-            && getDN2ID().get(txn, dn) != null);
+    final boolean parentThere = dnCache.contains(dn);
     //Add the DN to the parent set if needed.
     if (parentThere) {
       synchronized(synchObject) {

--
Gitblit v1.10.0