From 9bac7b4f5bd4c3fa6abd420e17b90418663faec6 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 20 Dec 2007 17:45:49 +0000
Subject: [PATCH] Updated indexes to order the keys before inserting them into the database. This assures no deadlocks will occur between multiple adds and mods.  Disabled lock timeouts for add and mod operations since deadlocks can not occur. This prevents txn aborts and op retry expiration due to lock timeouts of add and mod operations when the server is under high write load. 

---
 opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java
index 57ab79d..36c4dad 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java
@@ -26,7 +26,6 @@
  */
 package org.opends.server.backends.jeb;
 
-import org.opends.server.protocols.asn1.ASN1OctetString;
 import org.opends.server.types.Entry;
 import org.opends.server.types.Modification;
 import com.sleepycat.je.DatabaseException;
@@ -60,7 +59,7 @@
    * @throws DatabaseException If an error occurs in the JE database.
    */
   public abstract void indexEntry(Transaction txn, Entry entry,
-                                Set<ASN1OctetString> keys)
+                                Set<byte[]> keys)
        throws DatabaseException;
 
   /**
@@ -77,8 +76,8 @@
    */
   public abstract void replaceEntry(Transaction txn,
                                     Entry oldEntry, Entry newEntry,
-                                    Set<ASN1OctetString> addKeys,
-                                    Set<ASN1OctetString> delKeys)
+                                    Set<byte[]> addKeys,
+                                    Set<byte[]> delKeys)
        throws DatabaseException;
 
   /**
@@ -97,7 +96,7 @@
   public abstract void modifyEntry(Transaction txn,
                                    Entry oldEntry, Entry newEntry,
                                    List<Modification> mods,
-                                   Set<ASN1OctetString> addKeys,
-                                   Set<ASN1OctetString> delKeys)
+                                   Set<byte[]> addKeys,
+                                   Set<byte[]> delKeys)
        throws DatabaseException;
 }

--
Gitblit v1.10.0