From c935bee2cdf486eac2e4c1f95cdc6a2f478d4c53 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Wed, 18 Nov 2009 14:04:25 +0000
Subject: [PATCH] Fix#4329 ECL - draft mode: after adding new suffix, can not search ECL because of invalid cookie
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
index 2e2812a..5bb3046 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -556,7 +556,7 @@
public void initializeCLSearchFromGenState(String crossDomainStartState)
throws DirectoryException
{
- initializeCLDomCtxts(crossDomainStartState);
+ initializeCLDomCtxts(crossDomainStartState, false);
}
/**
@@ -652,7 +652,7 @@
}
this.draftCompat = true;
- initializeCLDomCtxts(crossDomainStartState);
+ initializeCLDomCtxts(crossDomainStartState, true);
}
catch(DirectoryException de)
{
@@ -675,10 +675,13 @@
/**
* Initialize the context for each domain.
- * @param providedCookie the provided generalized state
+ * @param providedCookie the provided generalized state
+ * @param allowUnknownDomains Provides all changes for domains not included
+ * in the provided cookie.
* @throws DirectoryException When an error occurs.
*/
- public void initializeCLDomCtxts(String providedCookie)
+ public void initializeCLDomCtxts(String providedCookie,
+ boolean allowUnknownDomains)
throws DirectoryException
{
HashMap<String,ServerState> startStates = new HashMap<String,ServerState>();
@@ -734,7 +737,8 @@
else
{
newDomainCtxt.startState = startStates.remove(rsd.getBaseDn());
- if ((providedCookie==null)||(providedCookie.length()==0))
+ if ((providedCookie==null)||(providedCookie.length()==0)
+ ||allowUnknownDomains)
newDomainCtxt.startState = new ServerState();
else
if (newDomainCtxt.startState == null)
--
Gitblit v1.10.0