From 71d60c2db03def788c464506afe1e087cf131db8 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 23 Feb 2007 20:16:28 +0000
Subject: [PATCH] Revert the changes in revision #1237 (for issue #740) because they have introduced a large number of test failures.
---
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
index e60ae62..b8a5a52 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -1521,6 +1521,8 @@
}
}
+ // Increment the entry count.
+ id2entry.adjustRecordCount(txn, 1);
}
/**
@@ -2019,6 +2021,8 @@
id2cBuffered.flush();
id2sBuffered.flush();
+ // Decrement the entry count.
+ id2entry.adjustRecordCount(txn, -getDeletedEntryCount());
}
/**
@@ -3249,7 +3253,7 @@
*/
public long getEntryCount() throws DatabaseException
{
- return id2entry.getRecordCount();
+ return id2entry.getRecordCount(null);
}
/**
@@ -3733,21 +3737,6 @@
}
/**
- * Get the count of key/data pairs in the database in a JE database.
- * This is a simple wrapper around the JE Database.count method.
- * @param database the JE database handle.
- * @return The count of key/data pairs in the database.
- * @throws DatabaseException If an error occurs in the JE operation.
- */
- public static long count(Database database) throws DatabaseException
- {
- long count = database.count();
- assert debugAccess("count", DATABASE_READ, null, database,
- null, null, null);
- return count;
- }
-
- /**
* Remove a database from disk.
*
* @param name The short database name, to which the entryContainer name will
--
Gitblit v1.10.0