From 4e0231d95ce73b8354afa7827cba077b9b105c85 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 29 Apr 2008 20:45:32 +0000
Subject: [PATCH] This patch resolves potential deadlocks in the JE backend when performing modify operations. This is done by ensuring the indexer orders the keys to add and delete together before DB accesses are performed. This patch also removes passing the JE transaction object into the indexer methods since it is not needed.

---
 opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
index cc2cdfc..4c8c2ae 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
@@ -289,7 +289,7 @@
   insert(Index index, Entry entry, EntryID entryID,
          Transaction txn) throws DatabaseException {
     Set<byte[]> keySet = new HashSet<byte[]>();
-    index.indexer.indexEntry(txn, entry, keySet);
+    index.indexer.indexEntry(entry, keySet);
     return index.insert(txn, keySet,  entryID);
   }
 
@@ -307,7 +307,7 @@
   delete(Index index, Entry entry, EntryID entryID,
          Transaction txn) throws DatabaseException {
     Set<byte[]> keySet = new HashSet<byte[]>();
-    index.indexer.indexEntry(txn, entry, keySet);
+    index.indexer.indexEntry(entry, keySet);
     index.delete(txn, keySet,  entryID);
   }
 

--
Gitblit v1.10.0