From 184794cf69c20ac52ad9049da9757b74c4438011 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 23 Jul 2014 09:34:23 +0000
Subject: [PATCH] OPENDJ-1441 (CR-4037) 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 |    4 +++-
 1 files changed, 3 insertions(+), 1 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 3b98f9c..f18b023 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
@@ -240,7 +240,9 @@
       return previousValue;
     }
 
-    if (MultimasterReplication.isECLEnabledDomain(baseDN))
+    // 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)

--
Gitblit v1.10.0