From 881c7d3d5c53debdd4a1bb5f63146f0f73d56957 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 25 Jul 2014 08:26:13 +0000
Subject: [PATCH] OPENDJ-1441 (CR-4082) Persistent searches on external changelog do not return changes for new replicas and new domains
---
opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java b/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java
index f18b023..7025753 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java
@@ -41,7 +41,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;
@@ -230,8 +229,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, FileReplicaDB> newValue = new ConcurrentHashMap<Integer, FileReplicaDB>();
final ConcurrentMap<Integer, FileReplicaDB> previousValue = domainToReplicaDBs.putIfAbsent(baseDN, newValue);
if (previousValue != null)
@@ -240,15 +238,10 @@
return previousValue;
}
- // When called at replication startup, the isECLEnabledDomain() method blocks on STARTING state.
- // Checking cursors list ensure that it is never called in the startup case.
- if (!registeredMultiDomainCursors.isEmpty() && 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