From 8466db8c12700bbab0835f5f1bfa71762e34ba4d Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 31 Aug 2007 17:55:26 +0000
Subject: [PATCH] Add support into the JE backend that can be used to store its compact schema encoding data in the database itself, and re-enable compact encoding by default in the configuration.  By storing the compact schema encoding data in the database (a separate copy for each backend), we have eliminated the potential problems in backup/restore and binary copy initialization if there are dependencies on an external schematokens.dat file.

---
 opends/src/server/org/opends/server/backends/jeb/EntryContainer.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
index 8a66f65..126224c 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -483,7 +483,8 @@
     {
       DataConfig entryDataConfig =
           new DataConfig(config.isBackendEntriesCompressed(),
-                         config.isBackendCompactEncoding());
+                         config.isBackendCompactEncoding(),
+                         rootContainer.getCompressedSchema());
 
       id2entry = new ID2Entry(databasePrefix + "_" + ID2ENTRY_DATABASE_NAME,
                               entryDataConfig, env, this);
@@ -565,6 +566,18 @@
   }
 
   /**
+   * Retrieves a reference to the root container in which this entry container
+   * exists.
+   *
+   * @return  A reference to the root container in which this entry container
+   *          exists.
+   */
+  public RootContainer getRootContainer()
+  {
+    return rootContainer;
+  }
+
+  /**
    * Get the DN database used by this entry entryContainer. The entryContainer
    * must have been opened.
    *
@@ -4270,7 +4283,8 @@
 
     DataConfig entryDataConfig =
         new DataConfig(cfg.isBackendEntriesCompressed(),
-                       cfg.isBackendCompactEncoding());
+                       cfg.isBackendCompactEncoding(),
+                       rootContainer.getCompressedSchema());
     id2entry.setDataConfig(entryDataConfig);
 
     this.config = cfg;

--
Gitblit v1.10.0