From 5747ebd0a8cab8dc034b88493027f04435723c0c Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 15 Feb 2011 18:26:42 +0000
Subject: [PATCH] Fix issue OPENDJ-48: Draft ECL: lastChangeNumber still not calculated correctly https://bugster.forgerock.org/jira/browse/OPENDJ-48
---
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java | 8 +++-----
1 files changed, 3 insertions(+), 5 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 01f79db..e0e347a 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions copyright 2011 ForgeRock AS
*/
package org.opends.server.replication.server;
@@ -3427,7 +3428,6 @@
*/
public long getEligibleCount(ServerState startState, ChangeNumber endCN)
{
- long sidRes = 0;
long res = 0;
// Parses the dbState of the domain , server by server
@@ -3440,7 +3440,7 @@
ChangeNumber startCN = null;
if (startState.getMaxChangeNumber(sid) != null)
startCN = startState.getMaxChangeNumber(sid);
- sidRes += getCount(sid, startCN, endCN);
+ long sidRes = getCount(sid, startCN, endCN);
// The startPoint is excluded when counting the ECL eligible changes
if ((startCN!=null)&&(sidRes>0))
@@ -3461,7 +3461,6 @@
*/
public long getEligibleCount(ChangeNumber startCN, ChangeNumber endCN)
{
- long sidRes = 0;
long res = 0;
// Parses the dbState of the domain , server by server
@@ -3473,8 +3472,7 @@
int sid = serverIDIterator.next();
ChangeNumber lStartCN =
new ChangeNumber(startCN.getTime(), startCN.getSeqnum(), sid);
- sidRes += getCount(sid, lStartCN, endCN);
- res+=sidRes;
+ res+=getCount(sid, lStartCN, endCN);
}
return res;
}
--
Gitblit v1.10.0