From f5efc93e858375f6b8e44eb1c04918372ae93f1b Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Wed, 09 Dec 2009 09:24:11 +0000
Subject: [PATCH] Fix #4361 ECL - draft mode: temporary fake lastChangeNumber after thousands of updates
---
opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java b/opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java
index 0c067bc..0e1629c 100644
--- a/opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java
@@ -320,8 +320,8 @@
/**
* Clear the changes from this DB (from both memory cache and DB storage)
* for the provided serviceID.
- * @param serviceIDToClear The serviceID for which we want to remove the
- * all records from the DraftCNDb.
+ * @param serviceIDToClear The serviceID for which we want to remove
+ * all records from the DraftCNDb - null means all.
* @throws DatabaseException When an exception occurs while removing the
* changes from the DB.
* @throws Exception When an exception occurs while accessing a resource
@@ -339,6 +339,7 @@
boolean finished = false;
boolean done = false;
+ ChangeNumber crossDomainEligibleCN = replicationServer.getEligibleCN();
// In case of deadlock detection by the Database, this thread can
// by aborted by a DeadlockException. This is a transient error and
// the transaction should be attempted again.
@@ -385,8 +386,8 @@
{
// let's get the eligible part of the domain
ServerState startSS = domain.getStartState();
- ServerState endSS = domain.getEligibleState(
- replicationServer.getEligibleCN());
+ ServerState endSS= domain.getEligibleState(crossDomainEligibleCN);
+
ChangeNumber fcn = startSS.getMaxChangeNumber(cn.getServerId());
ChangeNumber lcn = endSS.getMaxChangeNumber(cn.getServerId());
--
Gitblit v1.10.0