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/ID2SIndexer.java | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java
index 5b3edbe..d8e1fba 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.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;
@@ -89,7 +88,7 @@
* @throws DatabaseException If an error occurs in the JE database.
*/
public void indexEntry(Transaction txn, Entry entry,
- Set<ASN1OctetString> addKeys)
+ Set<byte[]> addKeys)
throws DatabaseException
{
// The superior entry IDs are in the entry attachment.
@@ -103,7 +102,7 @@
while (iter.hasNext())
{
DatabaseEntry nodeIDData = ((EntryID)iter.next()).getDatabaseEntry();
- addKeys.add(new ASN1OctetString(nodeIDData.getData()));
+ addKeys.add(nodeIDData.getData());
}
}
@@ -121,8 +120,8 @@
*/
public void replaceEntry(Transaction txn,
Entry oldEntry, Entry newEntry,
- Set<ASN1OctetString> addKeys,
- Set<ASN1OctetString> delKeys)
+ Set<byte[]> addKeys,
+ Set<byte[]> delKeys)
throws DatabaseException
{
// Nothing to do.
@@ -145,8 +144,8 @@
*/
public 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
{
// Nothing to do.
--
Gitblit v1.10.0