From 20d43c0d51839d0ef2e6963c8fcd1d2e4c62b234 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 27 Aug 2013 07:42:15 +0000
Subject: [PATCH] ServerState.java: Assigned serverIdToChangeNumber field in the declaration. In reload(), called update(). In cover(ServerState), cover(ChangeNumber). In duplicate(), called Map.putAll().

---
 opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java
index 10e0b71..7a86d28 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java
@@ -44,9 +44,9 @@
 import org.opends.server.replication.common.ServerState;
 import org.opends.server.replication.server.ReplicationServer;
 import org.opends.server.replication.server.ReplicationServerDomain;
-import org.opends.server.replication.server.changelog.api.ChangelogException;
 import org.opends.server.replication.server.changelog.api.ChangelogDB;
 import org.opends.server.replication.server.changelog.api.ChangelogDBIterator;
+import org.opends.server.replication.server.changelog.api.ChangelogException;
 import org.opends.server.replication.server.changelog.je.DraftCNDB.*;
 import org.opends.server.types.Attribute;
 import org.opends.server.types.Attributes;
@@ -317,15 +317,6 @@
       return;
     }
 
-    // FIXME is this correct?
-    // This code is not setting the excludedBaseDNs of the RS which means it
-    // could take any value set by one of the other methods!
-    // In addition, this code is not thread safe, but I suspect it is used in a
-    // multi-threaded way.
-    // The call to RS.getEligibleCN() is not reliable in any way and could
-    // return very different values even if the DB content did not change!!
-    ChangeNumber crossDomainEligibleCN = replicationServer.getEligibleCN();
-
     for (int i = 0; i < 100; i++)
     {
       final DraftCNDBCursor cursor = db.openDeleteCursor();
@@ -361,10 +352,6 @@
           }
 
           final ServerState startState = domain.getStartState();
-
-          // We don't use the returned endState but it's updating CN as reading
-          domain.getEligibleState(crossDomainEligibleCN);
-
           final ChangeNumber fcn = startState.getChangeNumber(cn.getServerId());
 
           final int currentDraftCN = cursor.currentKey();

--
Gitblit v1.10.0