From 540ea316e77eb38f09a74b07365964c2a1161d8e Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <yannick.lecaillez@forgerock.com>
Date: Tue, 31 Mar 2015 16:02:26 +0000
Subject: [PATCH] OPENDJ-1199: Reduce memory/disk usage of JE backend (variable length encoding for EntryIDSet)
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java
index c728529..631f825 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java
@@ -1301,7 +1301,7 @@
if (entryContainer != null && !suffix.getExcludeBranches().isEmpty())
{
logger.info(NOTE_JEB_IMPORT_MIGRATION_START, "excluded", suffix.getBaseDN());
- Cursor cursor = txn.openCursor(entryContainer.getDN2ID().getName());
+ Cursor<ByteString, ByteString> cursor = txn.openCursor(entryContainer.getDN2ID().getName());
try
{
for (DN excludedDN : suffix.getExcludeBranches())
@@ -1365,7 +1365,7 @@
if (entryContainer != null && !suffix.getIncludeBranches().isEmpty())
{
logger.info(NOTE_JEB_IMPORT_MIGRATION_START, "existing", suffix.getBaseDN());
- Cursor cursor = txn.openCursor(entryContainer.getDN2ID().getName());
+ Cursor<ByteString, ByteString> cursor = txn.openCursor(entryContainer.getDN2ID().getName());
try
{
final List<ByteString> includeBranches = includeBranchesAsBytes(suffix);
@@ -2188,7 +2188,7 @@
/** Why do we still need this if we are checking parents in the first phase? */
private boolean checkParent(ReadableTransaction txn, ImportIDSet idSet) throws StorageRuntimeException
{
- entryID = new EntryID(idSet.valueToByteString());
+ entryID = idSet.iterator().next();
parentDN = getParent(idSet.getKey());
//Bypass the cache for append data, lookup the parent in DN2ID and return.
@@ -2958,7 +2958,7 @@
public Void call() throws Exception
{
ID2Entry id2entry = entryContainer.getID2Entry();
- Cursor cursor = txn.openCursor(id2entry.getName());
+ Cursor<ByteString, ByteString> cursor = txn.openCursor(id2entry.getName());
try
{
while (cursor.next())
--
Gitblit v1.10.0