From 5e7ac2c015e5baebb0cf673715b5243d1fc765ae Mon Sep 17 00:00:00 2001
From: mrossign <mrossign@localhost>
Date: Thu, 26 Nov 2009 16:38:09 +0000
Subject: [PATCH] Fixed another case where the too slow log message may arrive. This is related to issue 4343 modifications.
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java | 8 ++++++--
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
index ce27179..28a8fc4 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -1606,7 +1606,11 @@
expectedMonitoringMsg =
Collections.synchronizedList(new ArrayList<GlobalServerId>());
- for (ReplicationServerDomain domain : baseDNs.values())
+ // Copy the list of domains as a new domain may arrive or disappear between
+ // the initializeMonitorData and completeMonitorData calls
+ List<ReplicationServerDomain> rsdList = new ArrayList(baseDNs.values());
+
+ for (ReplicationServerDomain domain : rsdList)
{
domain.initializeMonitorData(expectedMonitoringMsg);
}
@@ -1614,7 +1618,7 @@
// Wait for responses
waitMonitorDataResponses();
- for (ReplicationServerDomain domain : baseDNs.values())
+ for (ReplicationServerDomain domain : rsdList)
{
domain.completeMonitorData();
}
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
index 2e11443..0c455f6 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -2595,7 +2595,7 @@
// Then initialize the max CN for the LS that produced something
// - from our own local db state
- // - whatever they are directly or undirectly connected
+ // - whatever they are directly or indirectly connected
ServerState dbServerState = getDbServerState();
wrkMonitorData.setRSState(replicationServer.getServerId(), dbServerState);
Iterator<Integer> it = dbServerState.iterator();
--
Gitblit v1.10.0