From ea9e25490664445215eff3c88189d32d748ee2b6 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 18 Aug 2006 17:26:43 +0000
Subject: [PATCH] Removed the unnessary first byte in index keys. Updated all methods to remove the use of these prefix keys to iterate over a range of index keys. Index.readRange is modified to allow for unspecified lower and upper bounds so the search starts and ends at the smallest and/or biggest key respectively.
---
opends/src/server/org/opends/server/backends/jeb/VerifyJob.java | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java b/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
index b27df18..bc891e0 100644
--- a/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
+++ b/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
@@ -1412,8 +1412,7 @@
// Equality index.
if (indexConfig.isEqualityIndex())
{
- byte[] keyBytes = attrIndex.makeEqualityKey(normalizedBytes);
- DatabaseEntry key = new DatabaseEntry(keyBytes);
+ DatabaseEntry key = new DatabaseEntry(normalizedBytes);
try
{
ConditionResult cr;
@@ -1422,12 +1421,12 @@
{
System.err.printf("Missing ID %d%n%s",
entryID.longValue(),
- keyDump(equalityIndex, keyBytes));
+ keyDump(equalityIndex, normalizedBytes));
errorCount++;
}
else if (cr == ConditionResult.UNDEFINED)
{
- incrEntryLimitStats(equalityIndex, keyBytes);
+ incrEntryLimitStats(equalityIndex, normalizedBytes);
}
}
catch (DatabaseException e)
@@ -1435,7 +1434,7 @@
assert debugException(CLASS_NAME, "verifyAttribute", e);
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
- keyDump(equalityIndex, keyBytes));
+ keyDump(equalityIndex, normalizedBytes));
errorCount++;
}
}
@@ -1486,8 +1485,7 @@
normalizedBytes =
orderingRule.normalizeValue(value.getValue()).value();
- byte[] keyBytes = attrIndex.makeEqualityKey(normalizedBytes);
- DatabaseEntry key = new DatabaseEntry(keyBytes);
+ DatabaseEntry key = new DatabaseEntry(normalizedBytes);
try
{
ConditionResult cr;
@@ -1496,12 +1494,12 @@
{
System.err.printf("Missing ID %d%n%s",
entryID.longValue(),
- keyDump(orderingIndex, keyBytes));
+ keyDump(orderingIndex, normalizedBytes));
errorCount++;
}
else if (cr == ConditionResult.UNDEFINED)
{
- incrEntryLimitStats(orderingIndex, keyBytes);
+ incrEntryLimitStats(orderingIndex, normalizedBytes);
}
}
catch (DatabaseException e)
@@ -1509,7 +1507,7 @@
assert debugException(CLASS_NAME, "verifyAttribute", e);
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
- keyDump(orderingIndex, keyBytes));
+ keyDump(orderingIndex, normalizedBytes));
errorCount++;
}
}
--
Gitblit v1.10.0