From aefad4e6cfa33be9eca8cda45861d98236d0faed Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Thu, 18 Jan 2007 09:20:48 +0000
Subject: [PATCH] put back the 980 revision that had been removed because of a regression. - fix the regression (schema problem) - disabled the ChangelogTest.stopChangelog() test that appear to cause some hangs.
---
opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java
index fc94e70..29e92ba 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java
@@ -170,10 +170,6 @@
public ChangelogCursor openReadCursor(ChangeNumber changeNumber)
throws DatabaseException, Exception
{
- if (changeNumber == null)
- changeNumber = readFirstChange();
- if (changeNumber == null)
- return null;
return new ChangelogCursor(changeNumber);
}
@@ -319,13 +315,16 @@
{
cursor = db.openCursor(txn, null);
- DatabaseEntry key = new ChangelogKey(startingChangeNumber);
- DatabaseEntry data = new DatabaseEntry();
-
- if (cursor.getSearchKey(key, data, LockMode.DEFAULT) !=
- OperationStatus.SUCCESS)
+ if (startingChangeNumber != null)
{
- throw new Exception("ChangeNumber not available");
+ key = new ChangelogKey(startingChangeNumber);
+ data = new DatabaseEntry();
+
+ if (cursor.getSearchKey(key, data, LockMode.DEFAULT) !=
+ OperationStatus.SUCCESS)
+ {
+ throw new Exception("ChangeNumber not available");
+ }
}
}
@@ -373,7 +372,7 @@
}
/**
- * Get the next ChangeNumber inthe database from this Cursor.
+ * Get the next ChangeNumber in the database from this Cursor.
*
* @return The next ChangeNumber in the database from this cursor.
* @throws DatabaseException In case of underlying database problem.
--
Gitblit v1.10.0