From ff99696311668f339200080a826bbc6efc708291 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 23 Dec 2013 10:18:05 +0000
Subject: [PATCH] OPENDJ-1263 Changenumber does not progress on the second replication server of a topology
---
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java b/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
index a031d43..1a2e8c8 100644
--- a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
+++ b/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
@@ -222,9 +222,10 @@
public static void deleteDomain(DN dn)
{
LDAPReplicationDomain domain = domains.remove(dn);
-
if (domain != null)
+ {
domain.delete();
+ }
// No replay threads running if no replication need
if (domains.size() == 0) {
@@ -257,8 +258,7 @@
// Create the list of domains that are already defined.
for (String name : configuration.listReplicationDomains())
{
- ReplicationDomainCfg domain = configuration.getReplicationDomain(name);
- createNewDomain(domain);
+ createNewDomain(configuration.getReplicationDomain(name));
}
/*
@@ -458,9 +458,7 @@
modifyOperation.setAttachment(EntryHistorical.HISTORICAL,
historicalInformation);
}
-
historicalInformation.setPurgeDelay(domain.getHistoricalPurgeDelay());
-
historicalInformation.setHistoricalAttrToOperation(modifyOperation);
if (modifyOperation.getModifications().isEmpty())
@@ -509,7 +507,6 @@
modifyDNOperation.setAttachment(EntryHistorical.HISTORICAL,
historicalInformation);
}
-
historicalInformation.setPurgeDelay(domain.getHistoricalPurgeDelay());
// Add to the operation the historical attribute : "dn:changeNumber:moddn"
@@ -798,18 +795,20 @@
}
/**
- * Returns whether the provided baseDN is disabled for the external changelog.
+ * Returns whether the provided baseDN represents a replication domain enabled
+ * for the external changelog.
*
* @param baseDN
- * the domain to check
- * @return true if the provided baseDN is disabled for the external changelog,
- * false otherwise
+ * the replication domain to check
+ * @return true if the provided baseDN is enabled for the external changelog,
+ * false if the provided baseDN is disabled for the external changelog
+ * or unknown to multimaster replication.
*/
- public static boolean isECLDisabledDomain(DN baseDN)
+ public static boolean isECLEnabledDomain(DN baseDN)
{
for (LDAPReplicationDomain domain : domains.values())
{
- if (!domain.isECLEnabled() && domain.getBaseDN().equals(baseDN))
+ if (domain.isECLEnabled() && domain.getBaseDN().equals(baseDN))
{
return true;
}
--
Gitblit v1.10.0