From 5c3196a7dc35588f22aa086e4e5cf6a563ec0de0 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 08 Nov 2006 20:19:03 +0000
Subject: [PATCH] This fix removes the static nextId property as well as the getters and setters for it out of the EntryID class. The nextId property is now a non static property in the RootContainer class. Each RootContainer is responsible for keeping track of the next ID and assigning new entry IDs to all entries in its EntryContainers. 

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

diff --git a/opends/src/server/org/opends/server/backends/jeb/ImportJob.java b/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
index ae9fc55..c8ae959 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
@@ -215,20 +215,12 @@
     rootContainer.openEntryContainers(config.getBaseDNs());
 
     // Create the import contexts for each base DN.
-    EntryID highestID = null;
     DN baseDN;
 
     for (EntryContainer entryContainer : rootContainer.getEntryContainers())
     {
       baseDN = entryContainer.getBaseDN();
 
-      // Keep track of the highest entry ID.
-      EntryID id = entryContainer.getHighestEntryID();
-      if (highestID == null || id.compareTo(highestID) > 0)
-      {
-        highestID = id;
-      }
-
       // Create an import context.
       ImportContext importContext = new ImportContext();
       importContext.setBufferSize(bufferSize);
@@ -248,9 +240,6 @@
       importMap.put(baseDN, importContext);
     }
 
-    // Initialize the entry ID generator.
-    EntryID.initialize(highestID);
-
     // Make a note of the time we started.
     long startTime = System.currentTimeMillis();
 
@@ -691,7 +680,7 @@
         }
 
         // Assign a new entry identifier and write the new DN.
-        entryID = EntryID.assignNext();
+        entryID = rootContainer.getNextEntryID();
         dn2id.insert(txn, entryDN, entryID);
 
         // Construct a list of IDs up the DIT.

--
Gitblit v1.10.0