From ddee41f1c970ad374149d00b1cb89a513499a8ec Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 19 Aug 2014 12:50:53 +0000
Subject: [PATCH] OPENDJ-1441 (CR-4082) Persistent searches on external changelog do not return changes for new replicas and new domains
---
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java b/opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
index ab55875..5fd16da 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
@@ -42,7 +42,6 @@
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.MultiDomainServerState;
import org.opends.server.replication.common.ServerState;
-import org.opends.server.replication.plugin.MultimasterReplication;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.replication.server.ChangelogState;
import org.opends.server.replication.server.ReplicationServer;
@@ -251,8 +250,7 @@
}
// unlucky, the domainMap does not exist: take the hit and create the
- // newValue, even though the same could be done concurrently by another
- // thread
+ // newValue, even though the same could be done concurrently by another thread
final ConcurrentMap<Integer, JEReplicaDB> newValue = new ConcurrentHashMap<Integer, JEReplicaDB>();
final ConcurrentMap<Integer, JEReplicaDB> previousValue = domainToReplicaDBs.putIfAbsent(baseDN, newValue);
if (previousValue != null)
@@ -261,13 +259,10 @@
return previousValue;
}
- if (MultimasterReplication.isECLEnabledDomain(baseDN))
+ // we just created a new domain => update all cursors
+ for (MultiDomainDBCursor cursor : registeredMultiDomainCursors)
{
- // we just created a new domain => update all cursors
- for (MultiDomainDBCursor cursor : registeredMultiDomainCursors)
- {
- cursor.addDomain(baseDN, null);
- }
+ cursor.addDomain(baseDN, null);
}
return newValue;
}
--
Gitblit v1.10.0