From ae41fb531bbbd1bc8f9f6a82eb41c4eeb2da63c4 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Mon, 30 May 2011 15:20:19 +0000
Subject: [PATCH] Resolve several issues with the External Changelog with regards to Cookies and changes with updates and purging. More specifically these changes are resolving the following issues : OPENDJ-57 - ECL: lastChangeNumber and firstChangeNumber reset to zero when the changelog is purged to empty OPENDJ-172 - External ChangeLog Cookie varies when searching with an empty cookie. Cookie should be reproducible. OPENDJ-173 - External ChangeLog cookies content is altered by Change purging and prevents from continuing search with a previous returned cookie.
---
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java | 23 +----------------------
1 files changed, 1 insertions(+), 22 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
index f7182f6..64cc575 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -3153,12 +3153,9 @@
* The eligibleState is : s1;cn14 / s2;cn26 / s3;cn31
*
* @param eligibleCN The provided eligibleCN.
- * @param allowOlderThanPurgeDate When true, the returned state can be older
- * than the purge date of the domain.
* @return The computed eligible server state.
*/
- public ServerState getEligibleState(ChangeNumber eligibleCN,
- boolean allowOlderThanPurgeDate)
+ public ServerState getEligibleState(ChangeNumber eligibleCN)
{
ServerState result = new ServerState();
@@ -3225,24 +3222,6 @@
}
}
- if (allowOlderThanPurgeDate == false)
- {
- boolean domainPurged = true;
- long latestDomainTrimDate = getLatestDomainTrimDate();
- Iterator<Integer> it = result.iterator();
- while (it.hasNext())
- {
- int sid = it.next();
- ChangeNumber cn = result.getMaxChangeNumber(sid);
- if ((cn.getTime()>0) && (cn.getTime()<latestDomainTrimDate))
- result.update(new ChangeNumber(0,0,sid));
- else
- domainPurged = false;
- }
- if (domainPurged == true)
- result.clear();
- }
-
if (debugEnabled())
TRACER.debugInfo("In " + this
+ " getEligibleState() result is " + result);
--
Gitblit v1.10.0