From 8c65daf79d1c7fbe47f556c4d4bba2c2859851d1 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Mon, 21 Apr 2008 21:08:12 +0000
Subject: [PATCH] This patch adds index buffering capabilities to the JE backend as to avoid using a fixed lock timeout for subtree delete and mod DN operations. Previously, any index modifications to subordinate entries of the affected operations will be performed with dn2id and id2entry modifications. This creates multiple random access to index database keys which could cause deadlocks in face of multiple parallel operations. With this fix, all index modifications are buffered up until the end of the operation so that each key of each index will be accessed once and in order. This maintains the DB access ordering in the JE backend of dn2id, id2entry, dn2uri, indexes in config order, VLV indexes in config order, and finally id2children and id2subtree. Since deadlocks should no longer occur in the JE backend, JE lock timeouts are now disabled at the JE environment level instead of the txn level. With this change, the performance of subtree deletes and mod DN operations have increased dramatically.
---
opends/src/server/org/opends/server/backends/jeb/ID2Entry.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
index e9425e6..80c5fc3 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
@@ -211,11 +211,12 @@
*
* @param txn The database transaction or null if none.
* @param id The desired entry ID which forms the key.
+ * @param lockMode The JE locking mode to be used for the read.
* @return The requested entry, or null if there is no such record.
* @throws JebException If an error occurs in the JE backend.
* @throws DatabaseException If an error occurs in the JE database.
*/
- public Entry get(Transaction txn, EntryID id)
+ public Entry get(Transaction txn, EntryID id, LockMode lockMode)
throws JebException, DatabaseException
{
DatabaseEntry key = id.getDatabaseEntry();
--
Gitblit v1.10.0