From f64caa52f6e4115effc5d0d703734fea31ca6048 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 30 Apr 2014 19:57:56 +0000
Subject: [PATCH] OPENDJ-1454 Remove all code supporting "dc=replicationChanges"
---
opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java | 27
opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java | 6
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java | 64
opends/src/messages/messages/replication_fr.properties | 6
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java | 5
opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java | 15
opends/src/quicksetup/org/opends/quicksetup/Constants.java | 6
opends/src/messages/messages/replication.properties | 11
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java | 33
opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java | 327 ++-----
opends/src/messages/messages/replication_zh_TW.properties | 6
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java | 49 -
opends/src/messages/messages/replication_es.properties | 6
opends/resource/config/config.ldif | 1
opends/resource/man/man1/list-backends.1 | 1
opends/src/messages/messages/replication_de.properties | 6
opends/src/messages/messages/replication_ko.properties | 6
/dev/null | 1333 ------------------------------
opends/src/main/docbkx/admin-guide/man-list-backends.xml | 1
opends/src/server/org/opends/server/replication/server/ReplicationServer.java | 201 ----
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java | 8
opends/src/messages/messages/replication_zh_CN.properties | 6
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java | 442 ---------
opends/src/messages/messages/replication_ja.properties | 6
opends/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java | 7
opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java | 34
26 files changed, 161 insertions(+), 2,452 deletions(-)
diff --git a/opends/resource/config/config.ldif b/opends/resource/config/config.ldif
index dd2d7a4..bdfc95f 100644
--- a/opends/resource/config/config.ldif
+++ b/opends/resource/config/config.ldif
@@ -82,7 +82,6 @@
ds-cfg-global-aci: (target="ldap:///cn=schema")(targetscope="base")(targetattr="objectClass||attributeTypes||dITContentRules||dITStructureRules||ldapSyntaxes||matchingRules||matchingRuleUse||nameForms||objectClasses")(version 3.0; acl "User-Visible Schema Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
ds-cfg-global-aci: (target="ldap:///")(targetscope="base")(targetattr="objectClass||namingContexts||supportedAuthPasswordSchemes||supportedControl||supportedExtension||supportedFeatures||supportedLDAPVersion||supportedSASLMechanisms||supportedTLSCiphers||supportedTLSProtocols||vendorName||vendorVersion")(version 3.0; acl "User-Visible Root DSE Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
ds-cfg-global-aci: (targetattr="createTimestamp||creatorsName||modifiersName||modifyTimestamp||entryDN||entryUUID||subschemaSubentry||etag||governingStructureRule||structuralObjectClass||hasSubordinates||numSubordinates")(version 3.0; acl "User-Visible Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
-ds-cfg-global-aci: (target="ldap:///dc=replicationchanges")(targetattr="*")(version 3.0; acl "Replication backend access"; deny (all) userdn="ldap:///anyone";)
cn: Access Control Handler
ds-cfg-java-class: org.opends.server.authorization.dseecompat.AciHandler
ds-cfg-enabled: true
diff --git a/opends/resource/man/man1/list-backends.1 b/opends/resource/man/man1/list-backends.1
index 0a47f5c..e07ffec 100644
--- a/opends/resource/man/man1/list-backends.1
+++ b/opends/resource/man/man1/list-backends.1
@@ -85,7 +85,6 @@
monitor : cn=monitor
myCompanyRoot : "dc=myCompany,dc=com"
myOrgRoot : o=myOrg
-replicationChanges : dc=replicationChanges
schema : cn=schema
tasks : cn=tasks
userRoot : "dc=example,dc=com"
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java b/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
index aaa8276..5fd3a99 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
@@ -22,8 +22,8 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS
*/
-
package org.opends.guitools.controlpanel.browser;
import java.awt.Font;
@@ -71,7 +71,6 @@
import org.opends.guitools.controlpanel.ui.renderer.BrowserCellRenderer;
import org.opends.guitools.controlpanel.util.NumSubordinateHacker;
import org.opends.guitools.controlpanel.util.Utilities;
-import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
import org.opends.server.types.LDAPURL;
import org.opends.server.util.ServerConstants;
@@ -119,9 +118,9 @@
private boolean showAttributeName;
private InitialLdapContext ctxConfiguration;
private InitialLdapContext ctxUserData;
- boolean followReferrals;
- boolean sorted;
- boolean showContainerOnly;
+ private boolean followReferrals;
+ private boolean sorted;
+ private boolean showContainerOnly;
private boolean automaticExpand;
private boolean automaticallyExpandedNode;
private String[] containerClasses;
@@ -301,9 +300,7 @@
if (index >= 0) { // A node has alreay this dn -> bug
throw new IllegalArgumentException("Duplicate suffix dn " + suffixDn);
}
- else {
- index = - (index + 1);
- }
+ index = -(index + 1);
SuffixNode newNode = new SuffixNode(suffixDn);
treeModel.insertNodeInto(newNode, parentNode, index);
startRefreshNode(newNode, null, true);
@@ -323,9 +320,7 @@
if (index >= 0) { // A node has alreay this dn -> bug
throw new IllegalArgumentException("Duplicate node dn " + nodeDn);
}
- else {
- index = - (index + 1);
- }
+ index = -(index + 1);
BasicNode newNode = new BasicNode(nodeDn);
treeModel.insertNodeInto(newNode, parentNode, index);
startRefreshNode(newNode, null, true);
@@ -620,9 +615,7 @@
if (childIndex >= 0) {
throw new IllegalArgumentException("Duplicate DN " + newEntryDn);
}
- else {
- childIndex = - (childIndex + 1);
- }
+ childIndex = -(childIndex + 1);
}
else {
childIndex = parentNode.getChildCount();
@@ -1027,8 +1020,9 @@
} else {
result = "(|(&(hasSubordinates=true)"+filter+")";
}
- for (int i = 0; i < containerClasses.length; i++) {
- result += "(objectClass=" + containerClasses[i] + ")";
+ for (String containerClass : containerClasses)
+ {
+ result += "(objectClass=" + containerClass + ")";
}
result += ")";
}
@@ -1107,7 +1101,6 @@
Utilities.areDnsEqual(dn, ConfigConstants.DN_MONITOR_ROOT) ||
Utilities.areDnsEqual(dn, ConfigConstants.DN_TRUST_STORE_ROOT) ||
Utilities.areDnsEqual(dn, ConfigConstants.DN_BACKUP_ROOT) ||
- Utilities.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN) ||
Utilities.areDnsEqual(dn, ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT))
{
isConfigurationNode = true;
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
index ca05960..42fe496 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
@@ -22,8 +22,8 @@
*
*
* Copyright 2008-2011 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS
*/
-
package org.opends.guitools.controlpanel.datamodel;
import java.util.Set;
@@ -294,8 +294,7 @@
"monitor".equalsIgnoreCase(id) ||
"backup".equalsIgnoreCase(id) ||
ADSContext.getDefaultBackendName().equalsIgnoreCase(id) ||
- "ads-truststore".equalsIgnoreCase(id) ||
- "replicationchanges".equalsIgnoreCase(id);
+ "ads-truststore".equalsIgnoreCase(id);
}
/**
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
index f137a10..3fdc88d 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -22,8 +22,8 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS
*/
-
package org.opends.guitools.controlpanel.ui;
import static org.opends.messages.AdminToolMessages.*;
@@ -59,7 +59,6 @@
import org.opends.guitools.controlpanel.task.Task;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.messages.Message;
-import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
@@ -119,7 +118,7 @@
* LDIF view (text based).
*/
LDIF_VIEW
- };
+ }
/**
* Default constructor.
@@ -472,7 +471,6 @@
DN.decode(ConfigConstants.DN_TASK_ROOT),
DN.decode(ConfigConstants.DN_MONITOR_ROOT),
DN.decode(ConfigConstants.DN_BACKUP_ROOT),
- DN.decode(Constants.REPLICATION_CHANGES_DN),
DN.decode(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT)
};
nonDeletable = new DN[] {
diff --git a/opends/src/main/docbkx/admin-guide/man-list-backends.xml b/opends/src/main/docbkx/admin-guide/man-list-backends.xml
index a4503cd..0fa41b1 100644
--- a/opends/src/main/docbkx/admin-guide/man-list-backends.xml
+++ b/opends/src/main/docbkx/admin-guide/man-list-backends.xml
@@ -111,7 +111,6 @@
monitor : cn=monitor
myCompanyRoot : "dc=myCompany,dc=com"
myOrgRoot : o=myOrg
-replicationChanges : dc=replicationChanges
schema : cn=schema
tasks : cn=tasks
userRoot : "dc=example,dc=com"</computeroutput>
diff --git a/opends/src/messages/messages/replication.properties b/opends/src/messages/messages/replication.properties
index f8bbc38..fa4fec7 100644
--- a/opends/src/messages/messages/replication.properties
+++ b/opends/src/messages/messages/replication.properties
@@ -165,23 +165,16 @@
to be the destination of a message of type %s
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=An unexpected error occurred when \
testing existence or creating the replication backend : %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=An unexpected error occurred when \
- deleting the replication backend : %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=An error occurred when \
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=An error occurred when \
exporting the entry %s : %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =An error occurred when \
creating the LDIF writer to export backend : %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =An error occurred when \
searching for %s : %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=Entry %s does not exist in \
- the replication server backend
SEVERE_ERR_UNKNOWN_DN_95=The base DN %s is not stored by any of the \
Directory Server backend
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=The replication \
server backend does not support the import ldif function
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=The replication \
- server backend cannot export its entries in LDIF format because the \
- export-ldif command must be run as a task
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Monitor data of remote servers \
are missing due to a processing error : %s
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
@@ -189,8 +182,6 @@
error: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=An Exception was caught \
while replaying replication message : %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=The replication server \
- configuration could not be found
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=The replication server is late \
regarding our changes: going to send missing ones
DEBUG_CHANGES_SENT_113=All missing changes sent to replication server
diff --git a/opends/src/messages/messages/replication_de.properties b/opends/src/messages/messages/replication_de.properties
index 69574e1..f12264a 100644
--- a/opends/src/messages/messages/replication_de.properties
+++ b/opends/src/messages/messages/replication_de.properties
@@ -110,17 +110,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=Beim Reinigen der Datenbank %s ist folgender Fehler aufgetreten: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=Protokollfehler: Ein Replikationsserver ist nicht das erwartete Ziel einer Nachricht des Typs %s
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Beim \u00dcberpr\u00fcfen des Vorhandenseins oder bei der Erstellung des Replikations-Backends ist ein unerwarteter Fehler aufgetreten : %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=Beim L\u00f6schen des Replikations-Backends ist ein unerwarteter Fehler aufgetreten : %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Beim Exportieren des Eintrags %s ist ein Fehler aufgetreten: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Beim Exportieren des Eintrags %s ist ein Fehler aufgetreten: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Beim Erstellen des LDIF-Schreibers zum Exportieren des Backends iste ein Fehler aufgetreten : %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =Bei der Suche nach %s ist ein Fehler aufgetreten: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=Eintrag %s ist nicht im Replikationsserver-Backends vorhanden
SEVERE_ERR_UNKNOWN_DN_95=Die Basis-DN %s wird nicht einem Directory-Server-Backend gespeichert
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=Das Replikationsserver-Backend unterst\u00fctzt den Import der LDIF-Funktion nicht
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=Das Replikationsserver-Backend kann seine Eintr\u00e4ge nicht in das LDIF-Format exportieren, da der Export-LDIF-Befehl als eine Aufgabe ausgef\u00fchrt werden muss
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u00dcberwachungsdaten der Remote-Server fehlen aufgrund eines Verarbeitungsfehlers : %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Bei der Wiedergabe der Replikationsnachricht wurde eine Ausnahme aufgefangen : %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=Die Konfiguration des Replikationsservers konnte nicht gefunden werden
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=Der Replikationsserver ist hinsichtlich unserer \u00c4nderungen versp\u00e4tet: fehlende \u00c4nderungen werden gesendet
DEBUG_CHANGES_SENT_113=Alle fehlenden \u00c4nderungen wurden an den Replikationsserver gesendet
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=Aufgefangene Ausnahme ver\u00f6ffentlicht Scheinvorg\u00e4nge f\u00fcr Dom\u00e4ne %s : %s
diff --git a/opends/src/messages/messages/replication_es.properties b/opends/src/messages/messages/replication_es.properties
index 44c43a6..a2a0266 100644
--- a/opends/src/messages/messages/replication_es.properties
+++ b/opends/src/messages/messages/replication_es.properties
@@ -110,17 +110,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=Al eliminar la base de datos %s, se ha producido el siguiente error: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=Error de protocolo: no se espera que un servidor de r\u00e9plica sea el destino de un mensaje del tipo %s
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Se ha producido un error inesperado al comprobar la existencia o crear el backend de repetici\u00f3n: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=Se ha producido un error inesperado al eliminar el backend de repetici\u00f3n: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Se produjo un error al exportar la entrada %s : %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Se produjo un error al exportar la entrada %s : %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Se ha producido un error al crear el editor de LDIF para exportar el backend: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =Se ha producido un error al buscar %s: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=La entrada %s no existe en el backend de servidor de repetici\u00f3n
SEVERE_ERR_UNKNOWN_DN_95=El ND de base %s no ha sido almacenado por ning\u00fan backend de Servidor de directorios
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=El backend de servidor de repetici\u00f3n no admite la funci\u00f3n de importaci\u00f3n de LDIF
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=El backend de servidor de repetici\u00f3n no puede exportar sus entradas en formato LDIF porque el comando export-ldif debe ejecutarse como tarea
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Faltan los datos de supervisi\u00f3n de los servidores remotos debido a un error de procesamiento: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Se ha detectado una excepci\u00f3n durante la reproducci\u00f3n del mensaje de repetici\u00f3n: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=No pudo encontrarse la configuraci\u00f3n de servidor de repetici\u00f3n
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=El servidor de repetici\u00f3n va con retraso en relaci\u00f3n con nuestros cambios: se enviar\u00e1n los que faltan
DEBUG_CHANGES_SENT_113=Se han enviado todos los cambios que faltaban al servidor de repetici\u00f3n
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=Se ha detectado una excepci\u00f3n al publicar operaciones falsas para el dominio %s: %s
diff --git a/opends/src/messages/messages/replication_fr.properties b/opends/src/messages/messages/replication_fr.properties
index 17fe59e..89e3fd4 100644
--- a/opends/src/messages/messages/replication_fr.properties
+++ b/opends/src/messages/messages/replication_fr.properties
@@ -110,17 +110,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=L'erreur suivante s'est produite lors de l'effacement de la base de donn\u00e9es %s\u00a0: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=Erreur de protocole : il n'est pas pr\u00e9vu qu'un serveur de r\u00e9plication soit la destination d'un message de type %s
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Une erreur inattendue s'est produite lors de la cr\u00e9ation ou du test de l'existence du backend de r\u00e9plication\u00a0: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=Une erreur inattendue s'est produite lors de la suppression du backend de r\u00e9plication\u00a0: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Occurrence d'erreur lors de l'exportation de l'entr\u00e9e %s\u00a0: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=Occurrence d'erreur lors de l'exportation de l'entr\u00e9e %s\u00a0: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Une erreur s'est produite lors de la cr\u00e9ation du processus d'\u00e9criture LDIF pour exporter le backend\u00a0: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =Une erreur s'est produite lors de la recherche de %s\u00a0: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=L'entr\u00e9e %s n'existe pas dans le backend de serveur de r\u00e9plication
SEVERE_ERR_UNKNOWN_DN_95=Le DN de base %s n'est stock\u00e9 par aucun backend Directory Server
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=Le backend de serveur de r\u00e9plication ne prend pas en charge la fonction d'importation LDIF
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=Le backend de serveur de r\u00e9plication ne peut pas exporter ses entr\u00e9es au format LDIF car la commande export-ldif doit \u00eatre ex\u00e9cut\u00e9e en tant que t\u00e2che
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Les donn\u00e9es de contr\u00f4le des serveurs distants sont manquantes en raison d'une erreur de traitement\u00a0: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Une exception a \u00e9t\u00e9 d\u00e9tect\u00e9e lors de la r\u00e9ex\u00e9cution du message de r\u00e9plication\u00a0: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=La configuration de serveur de r\u00e9plication est introuvable
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=Le serveur de r\u00e9plication est en retard concernant nos modifications\u00a0: il va envoyer les \u00e9l\u00e9ments manquants
DEBUG_CHANGES_SENT_113=Toutes les modifications manquantes ont \u00e9t\u00e9 envoy\u00e9es au serveur de r\u00e9plication
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=Exception d\u00e9tect\u00e9e lors de la publication d'op\u00e9rations factices pour le domaine %s\u00a0: %s
diff --git a/opends/src/messages/messages/replication_ja.properties b/opends/src/messages/messages/replication_ja.properties
index c620ffa..b48b796 100644
--- a/opends/src/messages/messages/replication_ja.properties
+++ b/opends/src/messages/messages/replication_ja.properties
@@ -110,17 +110,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 %s \u306e\u6d88\u53bb\u4e2d\u306b\u6b21\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=\u30d7\u30ed\u30c8\u30b3\u30eb\u30a8\u30e9\u30fc: \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306f\u30bf\u30a4\u30d7 %s \u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5b9b\u5148\u3068\u3057\u3066\u671f\u5f85\u3055\u308c\u3066\u3044\u307e\u305b\u3093
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u5b58\u5728\u3092\u78ba\u8a8d\u4e2d\u3001\u307e\u305f\u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u4f5c\u6210\u4e2d\u306b\u3001\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u524a\u9664\u4e2d\u306b\u3001\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u30a8\u30f3\u30c8\u30ea %s \u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u30a8\u30f3\u30c8\u30ea %s \u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306e LDIF \u30e9\u30a4\u30bf\u30fc\u3092\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =%s \u306e\u691c\u7d22\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u30a8\u30f3\u30c8\u30ea %s \u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u5b58\u5728\u3057\u307e\u305b\u3093
SEVERE_ERR_UNKNOWN_DN_95=\u30d9\u30fc\u30b9 DN %s \u306f\u3001\u3044\u305a\u308c\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u3082\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u305b\u3093
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067 LDIF \u30a4\u30f3\u30dd\u30fc\u30c8\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067\u30a8\u30f3\u30c8\u30ea\u3092 LDIF \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3067\u304d\u307e\u305b\u3093\u3002export-ldif \u30b3\u30de\u30f3\u30c9\u306f\u30bf\u30b9\u30af\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u51e6\u7406\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u305f\u3081\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u306e\u76e3\u8996\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u518d\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u6210\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u304c\u3053\u3061\u3089\u306e\u5909\u66f4\u306b\u5bfe\u3057\u3066\u9045\u308c\u3066\u3044\u307e\u3059: \u4e0d\u8db3\u5206\u3092\u9001\u4fe1\u3057\u307e\u3059
DEBUG_CHANGES_SENT_113=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3055\u308c\u305f\u4e0d\u8db3\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u5909\u66f4
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=\u30c9\u30e1\u30a4\u30f3 %s \u306b\u5bfe\u3059\u308b\u7591\u4f3c\u64cd\u4f5c\u3092\u516c\u958b\u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %s
diff --git a/opends/src/messages/messages/replication_ko.properties b/opends/src/messages/messages/replication_ko.properties
index 4c4fc78..4832c68 100644
--- a/opends/src/messages/messages/replication_ko.properties
+++ b/opends/src/messages/messages/replication_ko.properties
@@ -104,17 +104,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=%s \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc9c0\uc6b0\ub294 \ub3d9\uc548 \ub2e4\uc74c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=\ud504\ub85c\ud1a0\ucf5c \uc624\ub958: \ubcf5\uc81c \uc11c\ubc84\ub294 %s \uc720\ud615 \uba54\uc2dc\uc9c0\uc758 \ub300\uc0c1\uc774 \ub420 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\ubcf5\uc81c \ubc31\uc5d4\ub4dc\ub97c \ub9cc\ub4e4\uac70\ub098 \uc788\ub294\uc9c0 \ud14c\uc2a4\ud2b8\ud558\ub294 \ub3d9\uc548 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=\ubcf5\uc81c \ubc31\uc5d4\ub4dc\ub97c \uc0ad\uc81c\ud558\ub294 \ub3d9\uc548 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=%s \ud56d\ubaa9\uc744 \ub0b4\ubcf4\ub0b4\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=%s \ud56d\ubaa9\uc744 \ub0b4\ubcf4\ub0b4\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\ubc31\uc5d4\ub4dc\ub97c \ub0b4\ubcf4\ub0b4\uae30 \uc704\ud55c LDIF \uc791\uc131\uae30\ub97c \ub9cc\ub4dc\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =%s\uc744(\ub97c) \uac80\uc0c9\ud558\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=%s \ud56d\ubaa9\uc774 \ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0 \uc5c6\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_UNKNOWN_DN_95=\ub514\ub809\ud1a0\ub9ac \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c \uae30\ubcf8 DN %s\uc744(\ub97c) \uc800\uc7a5\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c ldif \uac00\uc838\uc624\uae30 \uae30\ub2a5\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=export-ldif \uba85\ub839\uc744 \uc791\uc5c5\uc73c\ub85c \uc2e4\ud589\ud574\uc57c \ud558\uae30 \ub54c\ubb38\uc5d0 \ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c \ud574\ub2f9 \ud56d\ubaa9\uc744 LDIF \ud615\uc2dd\uc73c\ub85c \ub0b4\ubcf4\ub0bc \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\ud504\ub85c\uc138\uc2f1 \uc624\ub958 \ub54c\ubb38\uc5d0 \uc6d0\uaca9 \uc11c\ubc84\uc758 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\ubcf5\uc81c \uba54\uc2dc\uc9c0\ub97c \uc7ac\uc0dd\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\ubcf5\uc81c \uc11c\ubc84 \uad6c\uc131\uc744 \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\ubcf5\uc81c \uc11c\ubc84\uac00 \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc81c \uc2dc\uac04\uc5d0 \ucc98\ub9ac\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \ub204\ub77d\ub41c \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc804\uc1a1\ud569\ub2c8\ub2e4.
DEBUG_CHANGES_SENT_113=\ub204\ub77d\ub41c \ubaa8\ub4e0 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ubcf5\uc81c \uc11c\ubc84\uc5d0 \uc804\uc1a1\ud588\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_COMPUTING_FAKE_OPS_115=\ubcf5\uc81c \uc11c\ubc84 %2$s\uc5d0 \ub300\ud574 %1$s \ub3c4\uba54\uc778\uc758 \ubaa8\uc758 \uc791\uc5c5\uc744 \uacc4\uc0b0\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %3$s
diff --git a/opends/src/messages/messages/replication_zh_CN.properties b/opends/src/messages/messages/replication_zh_CN.properties
index a06aae1..71f0eff 100644
--- a/opends/src/messages/messages/replication_zh_CN.properties
+++ b/opends/src/messages/messages/replication_zh_CN.properties
@@ -110,17 +110,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=\u6e05\u9664\u6570\u636e\u5e93 %s \u65f6\u53d1\u751f\u5982\u4e0b\u9519\u8bef: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=\u534f\u8bae\u9519\u8bef\uff1a\u590d\u5236\u670d\u52a1\u5668\u4e0d\u662f\u7c7b\u578b\u4e3a %s \u7684\u6d88\u606f\u7684\u9884\u671f\u76ee\u6807
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u6d4b\u8bd5\u5b58\u5728\u6027\u6216\u521b\u5efa\u590d\u5236\u540e\u7aef\u65f6\u51fa\u73b0\u610f\u5916\u9519\u8bef: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=\u5220\u9664\u590d\u5236\u540e\u7aef\u65f6\u51fa\u73b0\u610f\u5916\u9519\u8bef: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u5728\u5bfc\u51fa\u6761\u76ee %s \u65f6\u51fa\u73b0\u9519\u8bef: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u5728\u5bfc\u51fa\u6761\u76ee %s \u65f6\u51fa\u73b0\u9519\u8bef: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u521b\u5efa LDIF \u7f16\u5199\u5668\u4ee5\u5bfc\u51fa\u540e\u7aef\u65f6\u51fa\u73b0\u9519\u8bef: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =\u641c\u7d22 %s \u65f6\u51fa\u73b0\u9519\u8bef: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e2d\u4e0d\u5b58\u5728\u6761\u76ee %s
SEVERE_ERR_UNKNOWN_DN_95=\u6240\u6709\u76ee\u5f55\u670d\u52a1\u5668\u540e\u7aef\u90fd\u672a\u5b58\u50a8\u57fa DN %s
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e0d\u652f\u6301\u5bfc\u5165 ldif \u529f\u80fd
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e0d\u80fd\u4ee5 LDIF \u683c\u5f0f\u5bfc\u51fa\u5176\u6761\u76ee\uff0c\u56e0\u4e3a export-ldif \u547d\u4ee4\u5fc5\u987b\u4f5c\u4e3a\u4efb\u52a1\u8fd0\u884c
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u7531\u4e8e\u5904\u7406\u9519\u8bef %s\uff0c\u56e0\u6b64\u4e22\u5931\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76d1\u89c6\u6570\u636e
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u5728\u91cd\u653e\u590d\u5236\u6d88\u606f\u65f6\u6355\u83b7\u5230\u5f02\u5e38: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u627e\u4e0d\u5230\u590d\u5236\u670d\u52a1\u5668\u914d\u7f6e
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u590d\u5236\u670d\u52a1\u5668\u672a\u53ca\u65f6\u53cd\u6620\u6211\u4eec\u7684\u66f4\u6539\uff1a\u5c06\u53d1\u9001\u4e22\u5931\u7684\u9879
DEBUG_CHANGES_SENT_113=\u6240\u6709\u4e22\u5931\u7684\u66f4\u6539\u90fd\u5df2\u53d1\u9001\u5230\u590d\u5236\u670d\u52a1\u5668
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=\u53d1\u5e03\u57df %s \u7684\u865a\u5047\u64cd\u4f5c\u65f6\u6355\u83b7\u5230\u5f02\u5e38: %s
diff --git a/opends/src/messages/messages/replication_zh_TW.properties b/opends/src/messages/messages/replication_zh_TW.properties
index 13521b0..6c96de4 100644
--- a/opends/src/messages/messages/replication_zh_TW.properties
+++ b/opends/src/messages/messages/replication_zh_TW.properties
@@ -104,17 +104,13 @@
SEVERE_ERR_ERROR_CLEARING_DB_87=\u6e05\u9664\u8cc7\u6599\u5eab %s \u6642\u767c\u751f\u4e0b\u5217\u932f\u8aa4: %s
NOTICE_ERR_ROUTING_TO_SERVER_88=\u5354\u5b9a\u932f\u8aa4: \u8907\u88fd\u4f3a\u670d\u5668\u4e0d\u61c9\u70ba\u8a0a\u606f\u985e\u578b %s \u7684\u76ee\u6a19
SEVERE_ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u6e2c\u8a66\u5b58\u5728\u6027\u6216\u5efa\u7acb\u8907\u88fd\u5f8c\u7aef\u6642\uff0c\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4: %s
-SEVERE_ERR_DELETE_REPL_BACKEND_FAILED_90=\u522a\u9664\u8907\u88fd\u5f8c\u7aef\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4: %s
- SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u532f\u51fa\u9805\u76ee %s \u6642\u767c\u751f\u932f\u8aa4: %s
+SEVERE_ERR_BACKEND_EXPORT_ENTRY_91=\u532f\u51fa\u9805\u76ee %s \u6642\u767c\u751f\u932f\u8aa4: %s
SEVERE_ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u5efa\u7acb LDIF \u7de8\u5beb\u5668\u4ee5\u532f\u51fa\u5f8c\u7aef\u6642\u767c\u751f\u932f\u8aa4: %s
SEVERE_ERR_BACKEND_SEARCH_ENTRY_93 =\u641c\u5c0b %s \u6642\u767c\u751f\u932f\u8aa4: %s
-SEVERE_ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u9805\u76ee %s \u4e0d\u5b58\u5728\u65bc\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u4e2d
SEVERE_ERR_UNKNOWN_DN_95=\u57fa\u5e95 DN %s \u4e26\u672a\u7531\u4efb\u4f55\u76ee\u9304\u4f3a\u670d\u5668\u5f8c\u7aef\u5132\u5b58
SEVERE_ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u4e0d\u652f\u63f4\u532f\u5165 LDIF \u529f\u80fd
-SEVERE_ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u7121\u6cd5\u4ee5 LDIF \u683c\u5f0f\u532f\u51fa\u5176\u9805\u76ee\uff0c\u56e0\u70ba export-ldif \u6307\u4ee4\u5fc5\u9808\u4ee5\u4f5c\u696d\u7684\u5f62\u5f0f\u57f7\u884c
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u9060\u7aef\u4f3a\u670d\u5668\u7684\u76e3\u8996\u8cc7\u6599\u56e0\u8655\u7406\u932f\u8aa4\u800c\u907a\u5931: %s
SEVERE_ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u91cd\u65b0\u57f7\u884c\u8907\u88fd\u8a0a\u606f\u6642\u767c\u751f\u7570\u5e38: %s
-SEVERE_ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u627e\u4e0d\u5230\u8907\u88fd\u4f3a\u670d\u5668\u914d\u7f6e
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u8907\u88fd\u4f3a\u670d\u5668\u4f86\u4e0d\u53ca\u8655\u7406\u6211\u5011\u7684\u66f4\u65b0: \u5c07\u50b3\u9001\u907a\u6f0f\u7684\u90e8\u5206
DEBUG_CHANGES_SENT_113=\u6240\u6709\u50b3\u9001\u81f3\u8907\u88fd\u4f3a\u670d\u5668\u7684\u907a\u6f0f\u8b8a\u66f4
SEVERE_ERR_COMPUTING_FAKE_OPS_115=\u70ba\u8907\u88fd\u4f3a\u670d\u5668 %2$s \u8a08\u7b97\u7db2\u57df %1$s \u7684\u5047\u4f5c\u696d\u6642\u767c\u751f\u7570\u5e38: %3$s
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Constants.java b/opends/src/quicksetup/org/opends/quicksetup/Constants.java
index 290b6e2..072538b 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Constants.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Constants.java
@@ -22,9 +22,8 @@
*
*
* Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2011-2013 ForgeRock AS
+ * Portions Copyright 2011-2014 ForgeRock AS
*/
-
package org.opends.quicksetup;
import org.opends.admin.ads.ADSContext;
@@ -67,9 +66,6 @@
/** DN of the schema object. */
public static final String SCHEMA_DN = "cn=schema";
- /** DN of the replication changes base DN. */
- public static final String REPLICATION_CHANGES_DN = "dc=replicationChanges";
-
/** The cli java system property. */
public static final String CLI_JAVA_PROPERTY = "org.opends.quicksetup.cli";
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java b/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java
index 8356a1f..e7783c25 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java
@@ -22,9 +22,8 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions Copyright 2013 ForgeRock AS.
+ * Portions Copyright 2013-2014 ForgeRock AS.
*/
-
package org.opends.quicksetup.installer.ui;
import java.awt.Component;
@@ -237,9 +236,7 @@
{
if (!Utils.areDnsEqual(suffix.getDN(),
ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(suffix.getDN(), Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(suffix.getDN(),
- Constants.REPLICATION_CHANGES_DN))
+ !Utils.areDnsEqual(suffix.getDN(), Constants.SCHEMA_DN))
{
orderedSuffixes.add(suffix);
}
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
deleted file mode 100644
index b54d33c..0000000
--- a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
+++ /dev/null
@@ -1,1333 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2007-2009 Sun Microsystems, Inc.
- * Portions copyright 2011-2013 ForgeRock AS
- */
-package org.opends.server.replication.server;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-import org.opends.messages.Message;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.server.*;
-import org.opends.server.api.Backend;
-import org.opends.server.api.SynchronizationProvider;
-import org.opends.server.backends.jeb.BackupManager;
-import org.opends.server.config.ConfigException;
-import org.opends.server.core.*;
-import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.protocols.internal.InternalClientConnection;
-import org.opends.server.protocols.internal.InternalSearchOperation;
-import org.opends.server.replication.common.CSN;
-import org.opends.server.replication.common.ServerState;
-import org.opends.server.replication.plugin.MultimasterReplication;
-import org.opends.server.replication.plugin.ReplicationServerListener;
-import org.opends.server.replication.protocol.*;
-import org.opends.server.replication.server.changelog.api.ChangelogException;
-import org.opends.server.replication.server.changelog.api.DBCursor;
-import org.opends.server.types.*;
-import org.opends.server.util.*;
-
-import static java.util.Collections.*;
-
-import static org.opends.messages.BackendMessages.*;
-import static org.opends.messages.JebMessages.*;
-import static org.opends.messages.ReplicationMessages.*;
-import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.ErrorLogger.*;
-import static org.opends.server.loggers.debug.DebugLogger.*;
-import static org.opends.server.types.FilterType.*;
-import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-
-/**
- * This class defines a backend that stores its information in an associated
- * replication server object.
- * <p>
- * This is primarily intended to take advantage of the backup/restore/
- * import/export of the backend API, and to provide an LDAP access to the
- * replication server database.
- * <p>
- * Entries stored in this backend are held in the DB associated with the
- * replication server.
- * <p>
- * Currently are only implemented the create and restore backup features.
- */
-public class ReplicationBackend extends Backend
-{
- private static final String CHANGE_NUMBER = "replicationChangeNumber";
-
- /**
- * The tracer object for the debug logger.
- */
- private static final DebugTracer TRACER = getTracer();
-
- private static final String BASE_DN = "dc=replicationchanges";
-
- /** The base DNs for this backend. */
- private DN[] baseDNs;
-
- /** The base DNs for this backend, in a hash set. */
- private Set<DN> baseDNSet;
-
- /** The set of supported controls for this backend. */
- private Set<String> supportedControls;
-
- /** The set of supported features for this backend. */
- private Set<String> supportedFeatures;
-
- private ReplicationServer server;
-
- /**
- * The number of milliseconds between job progress reports.
- */
- private long progressInterval = 10000;
-
- /**
- * The current number of entries exported.
- */
- private long exportedCount = 0;
-
- /**
- * The current number of entries skipped.
- */
- private long skippedCount = 0;
-
- /** Objectclass for getEntry root entries. */
- private Map<ObjectClass, String> rootObjectclasses;
-
- /** Attributes used for getEntry root entries. */
- private Map<AttributeType, List<Attribute>> attributes;
-
- /** Operational attributes used for getEntry root entries. */
- private Map<AttributeType,List<Attribute>> operationalAttributes;
-
-
- /**
- * Creates a new backend with the provided information. All backend
- * implementations must implement a default constructor that use
- * <CODE>super()</CODE> to invoke this constructor.
- */
- public ReplicationBackend()
- {
- super();
- // Perform all initialization in initializeBackend.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public void configureBackend(Configuration config) throws ConfigException
- {
- if (config != null)
- {
- Validator.ensureTrue(config instanceof BackendCfg);
- BackendCfg cfg = (BackendCfg) config;
- DN[] newBaseDNs = new DN[cfg.getBaseDN().size()];
- cfg.getBaseDN().toArray(newBaseDNs);
- this.baseDNs = newBaseDNs;
- }
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void initializeBackend()
- throws ConfigException, InitializationException
- {
- if ((baseDNs == null) || (baseDNs.length != 1))
- {
- Message message = ERR_MEMORYBACKEND_REQUIRE_EXACTLY_ONE_BASE.get();
- throw new ConfigException(message);
- }
-
- baseDNSet = new HashSet<DN>(Arrays.asList(baseDNs));
-
- supportedControls = new HashSet<String>();
- supportedFeatures = new HashSet<String>();
-
- for (DN dn : baseDNs)
- {
- try
- {
- DirectoryServer.registerBaseDN(dn, this, true);
- }
- catch (Exception e)
- {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
-
- Message message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get(
- dn.toString(), getExceptionMessage(e));
- throw new InitializationException(message, e);
- }
- }
- rootObjectclasses = new LinkedHashMap<ObjectClass,String>(3);
- rootObjectclasses.put(DirectoryServer.getTopObjectClass(), OC_TOP);
- ObjectClass domainOC = DirectoryServer.getObjectClass("domain", true);
- rootObjectclasses.put(domainOC, "domain");
- ObjectClass objectclassOC =
- DirectoryServer.getObjectClass(ATTR_OBJECTCLASSES_LC, true);
- rootObjectclasses.put(objectclassOC, ATTR_OBJECTCLASSES_LC);
-
- attributes = new LinkedHashMap<AttributeType,List<Attribute>>();
- Attribute a = Attributes.create("changetype", "add");
- List<Attribute> attrList = new ArrayList<Attribute>(1);
- attrList.add(a);
- attributes.put(a.getAttributeType(), attrList);
- operationalAttributes = new LinkedHashMap<AttributeType,List<Attribute>>();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void finalizeBackend()
- {
- for (DN dn : baseDNs)
- {
- try
- {
- DirectoryServer.deregisterBaseDN(dn);
- }
- catch (Exception e)
- {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
- }
- }
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public DN[] getBaseDNs()
- {
- return baseDNs;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized long getEntryCount()
- {
- if (server==null)
- {
- try
- {
- server = getReplicationServer();
- if (server == null)
- {
- return 0;
- }
- }
- catch(Exception e)
- {
- return 0;
- }
- }
-
- //This method only returns the number of actual change entries, the
- //domain and any baseDN entries are not counted.
- long retNum=0;
- for (ReplicationServerDomain rsd : toIterable(server.getDomainIterator()))
- {
- retNum += rsd.getChangesCount();
- }
- return retNum;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean isLocal()
- {
- return true;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean isIndexed(AttributeType attributeType, IndexType indexType)
- {
- return true;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized Entry getEntry(DN entryDN)
- {
- try {
- if (baseDNSet.contains(entryDN)) {
- return new Entry(entryDN, rootObjectclasses, attributes,
- operationalAttributes);
- }
-
- InternalClientConnection conn =
- InternalClientConnection.getRootConnection();
- SearchFilter filter =
- SearchFilter.createFilterFromString("(changetype=*)");
- InternalSearchOperation searchOp = new InternalSearchOperation(conn,
- InternalClientConnection.nextOperationID(),
- InternalClientConnection.nextMessageID(),
- null, entryDN, SearchScope.BASE_OBJECT,
- DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
- filter, null, null);
- search(searchOp);
- List<SearchResultEntry> resultEntries = searchOp.getSearchEntries();
- if (resultEntries.size() != 0)
- {
- return resultEntries.get(0);
- }
- }
- catch (DirectoryException ignored)
- {
- }
- return null;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized boolean entryExists(DN entryDN)
- {
- return getEntry(entryDN) != null;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void addEntry(Entry entry, AddOperation addOperation)
- throws DirectoryException
- {
- Message message = ERR_BACKUP_ADD_NOT_SUPPORTED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void deleteEntry(DN entryDN,
- DeleteOperation deleteOperation)
- throws DirectoryException
- {
- Message message = ERR_BACKUP_DELETE_NOT_SUPPORTED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void replaceEntry(Entry oldEntry, Entry newEntry,
- ModifyOperation modifyOperation)
- throws DirectoryException
- {
- Message message = ERR_BACKUP_MODIFY_NOT_SUPPORTED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void renameEntry(DN currentDN, Entry entry,
- ModifyDNOperation modifyDNOperation)
- throws DirectoryException
- {
- Message message = ERR_BACKUP_MODIFY_DN_NOT_SUPPORTED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public Set<String> getSupportedControls()
- {
- return supportedControls;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public Set<String> getSupportedFeatures()
- {
- return supportedFeatures;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean supportsLDIFExport()
- {
- return true;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void exportLDIF(LDIFExportConfig exportConfig)
- throws DirectoryException
- {
- if(server == null) {
- Message message = ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,message);
- }
-
- final List<ReplicationServerDomain> exportedDomains =
- selectReplicationDomains(exportConfig.getIncludeBranches());
-
- // Make a note of the time we started.
- long startTime = System.currentTimeMillis();
-
- // Start a timer for the progress report.
- Timer timer = new Timer();
- TimerTask progressTask = new ProgressTask();
- timer.scheduleAtFixedRate(progressTask, progressInterval, progressInterval);
-
- // Create the LDIF writer.
- LDIFWriter ldifWriter;
- try
- {
- ldifWriter = new LDIFWriter(exportConfig);
- }
- catch (Exception e)
- {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
-
- Message message =
- ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER.get(String.valueOf(e));
- throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
- message, e);
- }
-
- exportRootChanges(exportedDomains, exportConfig, ldifWriter);
-
- try
- {
- for (ReplicationServerDomain domain : exportedDomains)
- {
- if (exportConfig.isCancelled())
- {
- break;
- }
- writeChangesAfterCSN(domain, exportConfig, ldifWriter, null, null);
- }
- }
- finally
- {
- timer.cancel();
-
- close(ldifWriter);
- }
-
- long finishTime = System.currentTimeMillis();
- long totalTime = finishTime - startTime;
-
- float rate = 0;
- if (totalTime > 0)
- {
- rate = 1000f*exportedCount / totalTime;
- }
-
- Message message = NOTE_JEB_EXPORT_FINAL_STATUS.get(
- exportedCount, skippedCount, totalTime/1000, rate);
- logError(message);
- }
-
- private List<ReplicationServerDomain> selectReplicationDomains(
- List<DN> includeBranches) throws DirectoryException
- {
- final List<ReplicationServerDomain> results =
- new ArrayList<ReplicationServerDomain>();
- final Iterable<ReplicationServerDomain> domains =
- toIterable(server.getDomainIterator());
- if (includeBranches == null || includeBranches.isEmpty())
- {
- for (ReplicationServerDomain domain : domains)
- {
- results.add(domain);
- }
- return results;
- }
-
- for (ReplicationServerDomain domain : domains)
- {
- DN baseDN = DN.decode(domain.getBaseDN() + "," + BASE_DN);
- for (DN includeBranch : includeBranches)
- {
- if (includeBranch.isDescendantOf(baseDN)
- || includeBranch.isAncestorOf(baseDN))
- {
- results.add(domain);
- break;
- }
- }
- }
- return results;
- }
-
- /**
- * Exports the root changes of the export, and one entry by domain.
- */
- private void exportRootChanges(List<ReplicationServerDomain> exportedDomains,
- final LDIFExportConfig exportConfig, LDIFWriter ldifWriter)
- {
- AttributeType ocType = DirectoryServer.getObjectClassAttributeType();
- AttributeBuilder builder = new AttributeBuilder(ocType);
- builder.add("top");
- builder.add("domain");
- Attribute ocAttr = builder.toAttribute();
-
- Map<AttributeType, List<Attribute>> attrs =
- new HashMap<AttributeType, List<Attribute>>();
- attrs.put(ocType, singletonList(ocAttr));
-
- try
- {
- ChangeRecordEntry changeRecord =
- new AddChangeRecordEntry(DN.decode(BASE_DN), attrs);
- ldifWriter.writeChangeRecord(changeRecord);
- }
- catch (Exception e) { /* do nothing */ }
-
- if (exportConfig == null)
- {
- return;
- }
-
- for (ReplicationServerDomain domain : exportedDomains)
- {
- if (exportConfig.isCancelled())
- {
- break;
- }
-
- final ServerState serverState = domain.getLatestServerState();
- TRACER.debugInfo("State=" + serverState);
- Attribute stateAttr = Attributes.create("state", serverState.toString());
- Attribute genidAttr = Attributes.create("generation-id",
- "" + domain.getGenerationId() + domain.getBaseDN());
-
- attrs.clear();
- attrs.put(ocType, singletonList(ocAttr));
- attrs.put(stateAttr.getAttributeType(), singletonList(stateAttr));
- attrs.put(genidAttr.getAttributeType(), singletonList(genidAttr));
-
- final String dnString = domain.getBaseDN() + "," + BASE_DN;
- try
- {
- DN dn = DN.decode(dnString);
- ldifWriter.writeChangeRecord(new AddChangeRecordEntry(dn, attrs));
- }
- catch (Exception e)
- {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
- logError(ERR_BACKEND_EXPORT_ENTRY.get(dnString, String.valueOf(e)));
- }
- }
- }
-
- /**
- * Exports or returns all the changes from a ReplicationServerDomain coming
- * after the CSN specified in the searchOperation.
- */
- private void writeChangesAfterCSN(ReplicationServerDomain rsDomain,
- final LDIFExportConfig exportConfig, LDIFWriter ldifWriter,
- SearchOperation searchOperation, final CSN previousCSN)
- throws DirectoryException
- {
- if (exportConfig != null && exportConfig.isCancelled())
- { // Abort if cancelled
- return;
- }
-
- DBCursor<UpdateMsg> cursor = null;
- try
- {
- cursor = rsDomain.getCursorFrom(previousCSN);
- int lookthroughCount = 0;
-
- // Walk through the changes
- cursor.next(); // first try to advance the cursor
- while (cursor.getRecord() != null)
- {
- if (exportConfig != null && exportConfig.isCancelled())
- { // abort if cancelled
- return;
- }
- if (!canContinue(searchOperation, lookthroughCount))
- {
- break;
- }
- lookthroughCount++;
- writeChange(cursor.getRecord(), ldifWriter, searchOperation,
- rsDomain.getBaseDN(), exportConfig != null);
- cursor.next();
- }
- }
- catch (ChangelogException e)
- {
- throw new DirectoryException(ResultCode.OPERATIONS_ERROR, e);
- }
- finally
- {
- close(cursor);
- }
- }
-
- private boolean canContinue(SearchOperation searchOperation,
- int lookthroughCount)
- {
- if (searchOperation == null)
- {
- return true;
- }
-
- int limit = searchOperation.getClientConnection().getLookthroughLimit();
- if (lookthroughCount > limit && limit > 0)
- {
- // lookthrough limit exceeded
- searchOperation.setResultCode(ResultCode.ADMIN_LIMIT_EXCEEDED);
- searchOperation.setErrorMessage(null);
- return false;
- }
-
- try
- {
- searchOperation.checkIfCanceled(false);
- return true;
- }
- catch (CanceledOperationException e)
- {
- searchOperation.setResultCode(ResultCode.CANCELED);
- searchOperation.setErrorMessage(null);
- return false;
- }
- }
-
- private CSN extractCSN(SearchOperation searchOperation)
- {
- if (searchOperation != null)
- {
- return extractCSN(searchOperation.getFilter());
- }
- return null;
- }
-
- /**
- * Attempt to extract a CSN from searchFilter like
- * ReplicationChangeNumber=xxxx or ReplicationChangeNumber>=xxxx.
- *
- * @param filter
- * The filter to evaluate.
- * @return The extracted CSN or null if no CSN was found.
- */
- private CSN extractCSN(SearchFilter filter)
- {
- // Try to optimize for filters like replicationChangeNumber>=xxxxx
- // or replicationChangeNumber=xxxxx :
- // If the search filter is one of these 2 filters, move directly to
- // ChangeNumber=xxxx before starting the iteration.
- final FilterType filterType = filter.getFilterType();
- if (GREATER_OR_EQUAL.equals(filterType) || EQUALITY.equals(filterType))
- {
- AttributeType changeNumberAttrType =
- DirectoryServer.getDefaultAttributeType(CHANGE_NUMBER);
- if (filter.getAttributeType().equals(changeNumberAttrType))
- {
- try
- {
- CSN startingCSN =
- new CSN(filter.getAssertionValue().getValue().toString());
- return new CSN(startingCSN.getTime(),
- startingCSN.getSeqnum() - 1, startingCSN.getServerId());
- }
- catch (Exception e)
- {
- // don't try to optimize the search if the ChangeNumber is
- // not a valid replication CSN.
- }
- }
- }
- else if (AND.equals(filterType))
- {
- for (SearchFilter filterComponent : filter.getFilterComponents())
- {
- // This code does not expect more than one CSN in the search filter.
- // It is ok, since it is only used by developers/testers for debugging.
- final CSN previousCSN = extractCSN(filterComponent);
- if (previousCSN != null)
- {
- return previousCSN;
- }
- }
- }
- return null;
- }
-
-
- /**
- * Exports one change.
- */
- private void writeChange(UpdateMsg updateMsg, LDIFWriter ldifWriter,
- SearchOperation searchOperation, DN baseDN, boolean isExport)
- {
- InternalClientConnection conn =
- InternalClientConnection.getRootConnection();
- Entry entry = null;
- DN dn = null;
-
- ObjectClass extensibleObjectOC =
- DirectoryServer.getDefaultObjectClass("extensibleObject");
-
- try
- {
- if (updateMsg instanceof LDAPUpdateMsg)
- {
- LDAPUpdateMsg msg = (LDAPUpdateMsg) updateMsg;
-
- if (msg instanceof AddMsg)
- {
- AddMsg addMsg = (AddMsg)msg;
- AddOperation addOperation = (AddOperation)msg.createOperation(conn);
-
- dn = DN.decode("puid=" + addMsg.getParentEntryUUID() + "+" +
- CHANGE_NUMBER + "=" + msg.getCSN() + "+" +
- msg.getDN() + "," + BASE_DN);
-
- Map<AttributeType,List<Attribute>> attrs =
- new HashMap<AttributeType,List<Attribute>>();
- Map<ObjectClass, String> objectclasses =
- new HashMap<ObjectClass, String>();
-
- for (RawAttribute a : addOperation.getRawAttributes())
- {
- Attribute attr = a.toAttribute();
- if (attr.getAttributeType().isObjectClassType())
- {
- for (ByteString os : a.getValues())
- {
- String ocName = os.toString();
- ObjectClass oc =
- DirectoryServer.getObjectClass(toLowerCase(ocName));
- if (oc == null)
- {
- oc = DirectoryServer.getDefaultObjectClass(ocName);
- }
-
- objectclasses.put(oc,ocName);
- }
- }
- else
- {
- addAttribute(attrs, attr);
- }
- }
- addAttribute(attrs, "changetype", "add");
-
- if (isExport)
- {
- ldifWriter.writeChangeRecord(new AddChangeRecordEntry(dn, attrs));
- }
- else
- {
- entry = new Entry(dn, objectclasses, attrs, null);
- }
- }
- else if (msg instanceof DeleteMsg)
- {
- dn = computeDN(msg);
- ChangeRecordEntry changeRecord = new DeleteChangeRecordEntry(dn);
- entry = writeChangeRecord(ldifWriter, changeRecord, isExport);
- }
- else if (msg instanceof ModifyMsg)
- {
- ModifyOperation op = (ModifyOperation)msg.createOperation(conn);
-
- dn = computeDN(msg);
- ChangeRecordEntry changeRecord =
- new ModifyChangeRecordEntry(dn, op.getRawModifications());
- entry = writeChangeRecord(ldifWriter, changeRecord, isExport);
- }
- else if (msg instanceof ModifyDNMsg)
- {
- ModifyDNOperation op = (ModifyDNOperation)msg.createOperation(conn);
-
- dn = computeDN(msg);
- ChangeRecordEntry changeRecord = new ModifyDNChangeRecordEntry(
- dn, op.getNewRDN(), op.deleteOldRDN(), op.getNewSuperior());
- entry = writeChangeRecord(ldifWriter, changeRecord, isExport);
- }
-
-
- if (isExport)
- {
- this.exportedCount++;
- }
- else
- {
- // Add extensibleObject objectclass and the ChangeNumber in the entry.
- if (!entry.getObjectClasses().containsKey(extensibleObjectOC))
- entry.addObjectClass(extensibleObjectOC);
-
- addAttribute(entry.getUserAttributes(), CHANGE_NUMBER,
- msg.getCSN().toString());
- addAttribute(entry.getUserAttributes(), "replicationDomain",
- baseDN.toNormalizedString());
-
- // Get the base DN, scope, and filter for the search.
- DN searchBaseDN = searchOperation.getBaseDN();
- SearchScope scope = searchOperation.getScope();
- SearchFilter filter = searchOperation.getFilter();
-
- if (entry.matchesBaseAndScope(searchBaseDN, scope)
- && filter.matchesEntry(entry))
- {
- searchOperation.returnEntry(entry, new LinkedList<Control>());
- }
- }
- }
- }
- catch (Exception e)
- {
- this.skippedCount++;
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
-
- final String dnStr = (dn != null) ? dn.toNormalizedString() : "Unknown";
-
- Message message;
- if (isExport)
- {
- message = ERR_BACKEND_EXPORT_ENTRY.get(dnStr, String.valueOf(e));
- }
- else
- {
- message = ERR_BACKEND_SEARCH_ENTRY.get(dnStr, e.getLocalizedMessage());
- }
- logError(message);
- }
- }
-
- private DN computeDN(LDAPUpdateMsg msg) throws DirectoryException
- {
- return DN.decode("uuid=" + msg.getEntryUUID() + "," + CHANGE_NUMBER + "="
- + msg.getCSN() + "," + msg.getDN() + "," + BASE_DN);
- }
-
- private Entry writeChangeRecord(LDIFWriter ldifWriter,
- ChangeRecordEntry changeRecord, boolean isExport) throws IOException,
- LDIFException
- {
- if (isExport)
- {
- ldifWriter.writeChangeRecord(changeRecord);
- return null;
- }
-
- final Writer writer = new Writer();
- writer.getLDIFWriter().writeChangeRecord(changeRecord);
- return writer.getLDIFReader().readEntry();
- }
-
- private void addAttribute(Map<AttributeType, List<Attribute>> attributes,
- String attrName, String attrValue)
- {
- addAttribute(attributes, Attributes.create(attrName, attrValue));
- }
-
- /**
- * Add an attribute to a provided Map of attribute.
- *
- * @param attributes The Map that should be updated.
- * @param attribute The attribute that should be added to the Map.
- */
- private void addAttribute(
- Map<AttributeType,List<Attribute>> attributes, Attribute attribute)
- {
- AttributeType attrType = attribute.getAttributeType();
- List<Attribute> attrs = attributes.get(attrType);
- if (attrs == null)
- {
- attrs = new ArrayList<Attribute>(1);
- attrs.add(attribute);
- attributes.put(attrType, attrs);
- }
- else
- {
- attrs.add(attribute);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean supportsLDIFImport()
- {
- return false;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized LDIFImportResult importLDIF(LDIFImportConfig importConfig)
- throws DirectoryException
- {
- Message message = ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED.get();
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean supportsBackup()
- {
- // This backend does not provide a backup/restore mechanism.
- return true;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean supportsBackup(BackupConfig backupConfig,
- StringBuilder unsupportedReason)
- {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override()
- public void createBackup(BackupConfig backupConfig)
- throws DirectoryException
- {
- createBackupManager().createBackup(getBackendDir(), backupConfig);
- }
-
- /** {@inheritDoc} */
- @Override()
- public void restoreBackup(RestoreConfig restoreConfig)
- throws DirectoryException
- {
- createBackupManager().restoreBackup(getBackendDir(), restoreConfig);
- }
-
- /** {@inheritDoc} */
- @Override()
- public void removeBackup(BackupDirectory backupDirectory, String backupID)
- throws DirectoryException
- {
- createBackupManager().removeBackup(backupDirectory, backupID);
- }
-
- private BackupManager createBackupManager()
- {
- return new BackupManager(getBackendID());
- }
-
- private File getBackendDir() throws DirectoryException
- {
- return getFileForPath(getReplicationServerCfg().getReplicationDBDirectory());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public boolean supportsRestore()
- {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public long numSubordinates(DN entryDN, boolean subtree)
- throws DirectoryException
- {
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
- ERR_NUM_SUBORDINATES_NOT_SUPPORTED.get());
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public ConditionResult hasSubordinates(DN entryDN)
- throws DirectoryException
- {
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
- ERR_HAS_SUBORDINATES_NOT_SUPPORTED.get());
- }
-
- /**
- * Set the replication server associated with this backend.
- * @param server The replication server.
- */
- public void setServer(ReplicationServer server)
- {
- this.server = server;
- }
-
- /**
- * This class reports progress of the export job at fixed intervals.
- */
- private final class ProgressTask extends TimerTask
- {
- /**
- * The number of entries that had been exported at the time of the
- * previous progress report.
- */
- private long previousCount = 0;
-
- /**
- * The time in milliseconds of the previous progress report.
- */
- private long previousTime;
-
- /**
- * Create a new export progress task.
- */
- public ProgressTask()
- {
- previousTime = System.currentTimeMillis();
- }
-
- /**
- * The action to be performed by this timer task.
- */
- @Override
- public void run()
- {
- long latestCount = exportedCount;
- long deltaCount = latestCount - previousCount;
- long latestTime = System.currentTimeMillis();
- long deltaTime = latestTime - previousTime;
-
- if (deltaTime == 0)
- {
- return;
- }
-
- float rate = 1000f*deltaCount / deltaTime;
-
- Message message =
- NOTE_JEB_EXPORT_PROGRESS_REPORT.get(latestCount, skippedCount, rate);
- logError(message);
-
- previousCount = latestCount;
- previousTime = latestTime;
- }
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public synchronized void search(SearchOperation searchOperation)
- throws DirectoryException
- {
- //This check is for GroupManager initialization. It currently doesn't
- //come into play because the replication server variable is null in
- //the check above. But if the order of initialization of the server variable
- //is ever changed, the following check will keep replication change entries
- //from being added to the groupmanager cache erroneously.
- List<Control> requestControls = searchOperation.getRequestControls();
- if (requestControls != null)
- {
- for (Control c : requestControls)
- {
- if (OID_INTERNAL_GROUP_MEMBERSHIP_UPDATE.equals(c.getOID()))
- {
- return;
- }
- }
- }
-
- // don't do anything if the search is a base search on the backend suffix.
- try
- {
- DN backendBaseDN = DN.decode(BASE_DN);
- if ( searchOperation.getScope().equals(SearchScope.BASE_OBJECT) &&
- backendBaseDN.equals(searchOperation.getBaseDN()) )
- {
- return;
- }
- }
- catch (Exception e)
- {
- return;
- }
-
- // Make sure the base entry exists if it's supposed to be in this backend.
- final DN searchBaseDN = searchOperation.getBaseDN();
- if (!handlesEntry(searchBaseDN))
- {
- DN matchedDN = searchBaseDN.getParentDNInSuffix();
- while (matchedDN != null)
- {
- if (handlesEntry(matchedDN))
- {
- break;
- }
- matchedDN = matchedDN.getParentDNInSuffix();
- }
-
- Message message = ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST.
- get(String.valueOf(searchBaseDN));
- throw new DirectoryException(
- ResultCode.NO_SUCH_OBJECT, message, matchedDN, null);
- }
-
- if (server==null)
- {
- server = getReplicationServer();
- if (server == null)
- {
- if (!baseDNSet.contains(searchBaseDN))
- {
- Message message = ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST.get(
- String.valueOf(searchBaseDN));
- throw new DirectoryException(
- ResultCode.NO_SUCH_OBJECT, message, null, null);
- }
- return;
- }
- }
-
- // Walk through all entries and send the ones that match.
- final List<ReplicationServerDomain> searchedDomains =
- selectReplicationDomains(Collections.singletonList(searchBaseDN));
- for (ReplicationServerDomain domain : searchedDomains)
- {
- final CSN previousCSN = extractCSN(searchOperation);
- writeChangesAfterCSN(domain, null, null, searchOperation, previousCSN);
- }
- }
-
- /**
- * Retrieves the replication server associated to this backend.
- *
- * @return The server retrieved
- * @throws DirectoryException When it occurs.
- */
- private ReplicationServer getReplicationServer() throws DirectoryException
- {
- for (SynchronizationProvider<?> provider :
- DirectoryServer.getSynchronizationProviders())
- {
- if (provider instanceof MultimasterReplication)
- {
- MultimasterReplication mmp = (MultimasterReplication)provider;
- ReplicationServerListener list = mmp.getReplicationServerListener();
- if (list != null)
- {
- return list.getReplicationServer();
- }
- }
- }
- return null;
- }
-
- /**
- * Find the replication server configuration associated with this replication
- * backend.
- */
- private ReplicationServerCfg getReplicationServerCfg()
- throws DirectoryException {
- RootCfg root = ServerManagementContext.getInstance().getRootConfiguration();
-
- for (String name : root.listSynchronizationProviders()) {
- SynchronizationProviderCfg syncCfg;
- try {
- syncCfg = root.getSynchronizationProvider(name);
- } catch (ConfigException e) {
- throw new DirectoryException(ResultCode.OPERATIONS_ERROR,
- ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND.get(), e);
- }
- if (syncCfg instanceof ReplicationSynchronizationProviderCfg) {
- ReplicationSynchronizationProviderCfg scfg =
- (ReplicationSynchronizationProviderCfg) syncCfg;
- try {
- return scfg.getReplicationServer();
- } catch (ConfigException e) {
- throw new DirectoryException(ResultCode.OPERATIONS_ERROR,
- ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND.get(), e);
- }
- }
- }
-
- // No replication server found.
- throw new DirectoryException(ResultCode.OPERATIONS_ERROR,
- ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND.get());
- }
-
- /**
- * Writer class to read/write from/to a bytearray.
- */
- private static final class Writer
- {
- /** The underlying output stream. */
- private final ByteArrayOutputStream stream;
-
- /** The underlying LDIF config. */
- private final LDIFExportConfig config;
-
- /** The LDIF writer. */
- private final LDIFWriter writer;
-
- /**
- * Create a new string writer.
- */
- public Writer() {
- this.stream = new ByteArrayOutputStream();
- this.config = new LDIFExportConfig(stream);
- try {
- this.writer = new LDIFWriter(config);
- } catch (IOException e) {
- // Should not happen.
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Get the LDIF writer.
- *
- * @return Returns the LDIF writer.
- */
- public LDIFWriter getLDIFWriter() {
- return writer;
- }
-
-
-
- /**
- * Close the writer and get an LDIF reader for the LDIF content.
- *
- * @return Returns an LDIF Reader.
- * @throws IOException
- * If an error occurred closing the writer.
- */
- public LDIFReader getLDIFReader() throws IOException {
- writer.close();
- String ldif = stream.toString("UTF-8");
- ldif = ldif.replace("\n-\n", "\n");
- ByteArrayInputStream istream = new ByteArrayInputStream(ldif.getBytes());
- LDIFImportConfig newConfig = new LDIFImportConfig(istream);
- // ReplicationBackend may contain entries that are not schema
- // compliant. Let's ignore them for now.
- newConfig.setValidateSchema(false);
- return new LDIFReader(newConfig);
- }
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void preloadEntryCache() throws UnsupportedOperationException {
- throw new UnsupportedOperationException("Operation not supported.");
- }
-}
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
index 53628b0..176922c 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -27,7 +27,6 @@
package org.opends.server.replication.server;
import java.io.IOException;
-import java.io.StringReader;
import java.net.*;
import java.util.*;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -35,13 +34,12 @@
import org.opends.messages.Category;
import org.opends.messages.Message;
-import org.opends.messages.MessageBuilder;
import org.opends.messages.Severity;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn.*;
import org.opends.server.admin.std.server.ReplicationServerCfg;
import org.opends.server.admin.std.server.UserDefinedVirtualAttributeCfg;
-import org.opends.server.api.*;
+import org.opends.server.api.VirtualAttributeProvider;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.WorkflowImpl;
@@ -53,14 +51,12 @@
import org.opends.server.replication.server.changelog.api.*;
import org.opends.server.replication.server.changelog.je.JEChangelogDB;
import org.opends.server.types.*;
-import org.opends.server.util.LDIFReader;
import org.opends.server.util.ServerConstants;
import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement;
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
-import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
@@ -71,9 +67,7 @@
* replicationServerDomain and managing it
*/
public final class ReplicationServer
- implements ConfigurationChangeListener<ReplicationServerCfg>,
- BackupTaskListener, RestoreTaskListener, ImportTaskListener,
- ExportTaskListener
+ implements ConfigurationChangeListener<ReplicationServerCfg>
{
private String serverURL;
@@ -96,17 +90,7 @@
private boolean stopListen = false;
private ReplSessionSecurity replSessionSecurity;
- /**
- * For the backend associated to this replication server, DN of the config
- * entry of the backend.
- */
- private DN backendConfigEntryDN;
- /** ID of the backend. */
- private static final String backendId = "replicationChanges";
-
- /**
- * The tracer object for the debug logger.
- */
+ /** The tracer object for the debug logger. */
private static final DebugTracer TRACER = getTracer();
private static String eclWorkflowID =
@@ -148,20 +132,6 @@
replSessionSecurity = new ReplSessionSecurity();
initialize();
configuration.addChangeListener(this);
- try
- {
- backendConfigEntryDN =
- DN.decode("ds-cfg-backend-id=" + backendId + ",cn=Backends,cn=config");
- } catch (DirectoryException e) { /* do nothing */ }
-
- // Creates the backend associated to this ReplicationServer
- // if it does not exist.
- createBackend();
-
- DirectoryServer.registerBackupTaskListener(this);
- DirectoryServer.registerRestoreTaskListener(this);
- DirectoryServer.registerExportTaskListener(this);
- DirectoryServer.registerImportTaskListener(this);
localPorts.add(getReplicationPort());
@@ -946,55 +916,6 @@
}
/**
- * Creates the backend associated to this replication server.
- */
- private void createBackend() throws ConfigException
- {
- try
- {
- String ldif = makeLdif(
- "dn: ds-cfg-backend-id="+backendId+",cn=Backends,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-backend",
- "ds-cfg-base-dn: dc="+backendId,
- "ds-cfg-enabled: true",
- "ds-cfg-writability-mode: enabled",
- "ds-cfg-java-class: " +
- "org.opends.server.replication.server.ReplicationBackend",
- "ds-cfg-backend-id: " + backendId);
-
- LDIFImportConfig ldifImportConfig = new LDIFImportConfig(
- new StringReader(ldif));
- LDIFReader reader = new LDIFReader(ldifImportConfig);
- Entry backendConfigEntry = reader.readEntry();
- if (!DirectoryServer.getConfigHandler().entryExists(backendConfigEntryDN))
- {
- // Add the replication backend
- DirectoryServer.getConfigHandler().addEntry(backendConfigEntry, null);
- }
- ldifImportConfig.close();
- }
- catch(Exception e)
- {
- MessageBuilder mb = new MessageBuilder();
- mb.append(e.getLocalizedMessage());
- Message msg = ERR_CHECK_CREATE_REPL_BACKEND_FAILED.get(mb.toString());
- throw new ConfigException(msg, e);
- }
- }
-
- private static String makeLdif(String... lines)
- {
- StringBuilder buffer = new StringBuilder();
- for (String line : lines) {
- buffer.append(line).append(EOL);
- }
- // Append an extra line so we can append LDIF Strings.
- buffer.append(EOL);
- return buffer.toString();
- }
-
- /**
* Do what needed when the config object related to this replication server
* is deleted from the server configuration.
*/
@@ -1004,122 +925,6 @@
TRACER.debugInfo("RS " + getMonitorInstanceName() + " starts removing");
shutdown();
- removeBackend();
-
- DirectoryServer.deregisterBackupTaskListener(this);
- DirectoryServer.deregisterRestoreTaskListener(this);
- DirectoryServer.deregisterExportTaskListener(this);
- DirectoryServer.deregisterImportTaskListener(this);
- }
-
- /**
- * Removes the backend associated to this Replication Server that has been
- * created when this replication server was created.
- */
- protected void removeBackend()
- {
- try
- {
- if (DirectoryServer.getConfigHandler().entryExists(backendConfigEntryDN))
- {
- // Delete the replication backend
- DirectoryServer.getConfigHandler().deleteEntry(backendConfigEntryDN,
- null);
- }
- }
- catch(Exception e)
- {
- MessageBuilder mb = new MessageBuilder();
- mb.append(e.getLocalizedMessage());
- Message msg = ERR_DELETE_REPL_BACKEND_FAILED.get(mb.toString());
- logError(msg);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processBackupBegin(Backend backend, BackupConfig config)
- {
- // Nothing is needed at the moment
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processBackupEnd(Backend backend, BackupConfig config,
- boolean successful)
- {
- // Nothing is needed at the moment
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processRestoreBegin(Backend backend, RestoreConfig config)
- {
- if (backend.getBackendID().equals(backendId))
- shutdown();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processRestoreEnd(Backend backend, RestoreConfig config,
- boolean successful)
- {
- if (backend.getBackendID().equals(backendId))
- initialize();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processImportBegin(Backend backend, LDIFImportConfig config)
- {
- // Nothing is needed at the moment
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processImportEnd(Backend backend, LDIFImportConfig config,
- boolean successful)
- {
- // Nothing is needed at the moment
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processExportBegin(Backend backend, LDIFExportConfig config)
- {
- if (debugEnabled())
- TRACER.debugInfo("RS " + getMonitorInstanceName() + " Export starts");
- if (backend.getBackendID().equals(backendId))
- {
- // Retrieves the backend related to this replicationServerDomain
- ReplicationBackend b =
- (ReplicationBackend)DirectoryServer.getBackend(backendId);
- b.setServer(this);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processExportEnd(Backend backend, LDIFExportConfig config,
- boolean successful)
- {
- // Nothing is needed at the moment
}
/**
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
index 8462ce6..3b9eab7 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -1359,29 +1359,6 @@
* {@link DBCursor#close()} method to free the resources and locks used by the
* cursor.
*
- * @param startAfterCSN
- * Starting point for the cursor. If null, start from the oldest CSN
- * @return a non null {@link DBCursor}
- * @throws ChangelogException
- * If a database problem happened
- * @see ReplicationDomainDB#getCursorFrom(DN, CSN)
- */
- public DBCursor<UpdateMsg> getCursorFrom(CSN startAfterCSN)
- throws ChangelogException
- {
- return domainDB.getCursorFrom(baseDN, startAfterCSN);
- }
-
- /**
- * Creates and returns a cursor across this replication domain.
- * <p>
- * Client code must call {@link DBCursor#next()} to advance the cursor to the
- * next available record.
- * <p>
- * When the cursor is not used anymore, client code MUST call the
- * {@link DBCursor#close()} method to free the resources and locks used by the
- * cursor.
- *
* @param startAfterServerState
* Starting point for the replicaDB cursors. If null, start from the
* oldest CSN
@@ -1397,16 +1374,6 @@
}
/**
- * Returns the change count for that ReplicationServerDomain.
- *
- * @return the change count.
- */
- public long getChangesCount()
- {
- return domainDB.getDomainChangesCount(baseDN);
- }
-
- /**
* Get the baseDN.
*
* @return Returns the baseDN.
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java b/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
index d5bdf8f..f2ba666 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
@@ -38,15 +38,6 @@
{
/**
- * Get the number of changes for the specified replication domain.
- *
- * @param baseDN
- * the replication domain baseDN
- * @return the number of changes.
- */
- long getDomainChangesCount(DN baseDN);
-
- /**
* Returns the oldest {@link CSN}s from the replicaDBs for each serverId in
* the specified replication domain.
*
@@ -102,29 +93,6 @@
/**
* Generates a {@link DBCursor} across all the replicaDBs for the specified
- * replication domain, with all cursors starting after the provided CSN.
- * <p>
- * The cursor is already advanced to the record after startAfterCSN.
- * <p>
- * When the cursor is not used anymore, client code MUST call the
- * {@link DBCursor#close()} method to free the resources and locks used by the
- * cursor.
- *
- * @param baseDN
- * the replication domain baseDN
- * @param startAfterCSN
- * Starting point for each ReplicaDB cursor. If null, start from the
- * oldest CSN for each ReplicaDB cursor.
- * @return a non null {@link DBCursor}
- * @throws ChangelogException
- * If a database problem happened
- * @see #getCursorFrom(DN, ServerState)
- */
- DBCursor<UpdateMsg> getCursorFrom(DN baseDN, CSN startAfterCSN)
- throws ChangelogException;
-
- /**
- * Generates a {@link DBCursor} across all the replicaDBs for the specified
* replication domain starting after the provided {@link ServerState} for each
* replicaDBs.
* <p>
@@ -143,7 +111,6 @@
* @return a non null {@link DBCursor}
* @throws ChangelogException
* If a database problem happened
- * @see #getCursorFrom(DN, CSN)
*/
DBCursor<UpdateMsg> getCursorFrom(DN baseDN,
ServerState startAfterServerState) throws ChangelogException;
@@ -168,7 +135,6 @@
* @return a non null {@link DBCursor}
* @throws ChangelogException
* If a database problem happened
- * @see #getCursorFrom(DN, CSN)
*/
DBCursor<UpdateMsg> getCursorFrom(DN baseDN, int serverId, CSN startAfterCSN)
throws ChangelogException;
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java b/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
index e23f4cb..f3507e0 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
@@ -520,19 +520,6 @@
StaticUtils.recursiveDelete(dbDirectory);
}
-
- /** {@inheritDoc} */
- @Override
- public long getDomainChangesCount(DN baseDN)
- {
- long entryCount = 0;
- for (JEReplicaDB replicaDB : getDomainMap(baseDN).values())
- {
- entryCount += replicaDB.getChangesCount();
- }
- return entryCount;
- }
-
/** {@inheritDoc} */
@Override
public ServerState getDomainOldestCSNs(DN baseDN)
@@ -724,16 +711,6 @@
/** {@inheritDoc} */
@Override
- public DBCursor<UpdateMsg> getCursorFrom(DN baseDN, CSN startAfterCSN)
- throws ChangelogException
- {
- // Builds a new serverState for all the serverIds in the replication domain
- // to ensure we get cursors starting after the provided CSN.
- return getCursorFrom(baseDN, buildServerState(baseDN, startAfterCSN));
- }
-
- /** {@inheritDoc} */
- @Override
public DBCursor<UpdateMsg> getCursorFrom(DN baseDN,
ServerState startAfterServerState) throws ChangelogException
{
@@ -767,32 +744,6 @@
return EMPTY_CURSOR;
}
- private ServerState buildServerState(DN baseDN, CSN startAfterCSN)
- {
- final ServerState result = new ServerState();
- if (startAfterCSN == null)
- {
- return result;
- }
-
- for (int serverId : getDomainMap(baseDN).keySet())
- {
- if (serverId == startAfterCSN.getServerId())
- {
- // reuse the provided CSN one as it is the most accurate
- result.update(startAfterCSN);
- }
- else
- {
- // build a new CSN, ignoring the seqNum since it is irrelevant for
- // a different serverId
- final CSN csn = startAfterCSN; // only used for increased readability
- result.update(new CSN(csn.getTime(), 0, serverId));
- }
- }
- return result;
- }
-
/** {@inheritDoc} */
@Override
public boolean publishUpdateMsg(DN baseDN, UpdateMsg updateMsg)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java b/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java
index 19406bd..6d93ca0 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java
@@ -175,21 +175,6 @@
}
/**
- * Get the number of changes.
- *
- * @return Returns the number of changes.
- */
- public long getChangesCount()
- {
- final CSNLimits limits = csnLimits;
- if (limits.newestCSN != null && limits.oldestCSN != null)
- {
- return limits.newestCSN.getSeqnum() - limits.oldestCSN.getSeqnum() + 1;
- }
- return 0;
- }
-
- /**
* Generate a new {@link DBCursor} that allows to browse the db managed by
* this ReplicaDB and starting at the position defined by a given CSN.
*
diff --git a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
index 9ca5a8f..eb1a863 100644
--- a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
+++ b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -22,13 +22,11 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2013 ForgeRock AS
+ * Portions Copyright 2011-2014 ForgeRock AS
* Portions Copyright 2012 profiq s.r.o.
*/
-
package org.opends.server.tools.dsreplication;
-
import org.opends.admin.ads.*;
import org.opends.admin.ads.ADSContext.ADSPropertySyntax;
import org.opends.admin.ads.ADSContext.AdministratorProperty;
@@ -42,6 +40,8 @@
import org.opends.guitools.controlpanel.util.*;
import org.opends.messages.Message;
import org.opends.messages.MessageBuilder;
+import org.opends.messages.MessageDescriptor.Arg0;
+import org.opends.messages.MessageDescriptor.Arg1;
import org.opends.quicksetup.ApplicationException;
import org.opends.quicksetup.Constants;
import org.opends.quicksetup.Installation;
@@ -101,13 +101,11 @@
import static org.opends.messages.AdminToolMessages.*;
import static org.opends.messages.QuickSetupMessages.*;
import static org.opends.messages.ToolMessages.*;
-import static org.opends.messages.UtilityMessages.
- ERR_CONFIRMATION_TRIES_LIMIT_REACHED;
-import static org.opends.quicksetup.util.Utils.getFirstValue;
-import static org.opends.quicksetup.util.Utils.getThrowableMsg;
+import static org.opends.messages.UtilityMessages.*;
+import static org.opends.quicksetup.util.Utils.*;
import static org.opends.server.tools.ToolConstants.*;
import static org.opends.server.tools.dsreplication.ReplicationCliReturnCode.*;
-import static org.opends.server.util.StaticUtils.close;
+import static org.opends.server.util.StaticUtils.*;
/**
* This class provides a tool that can be used to enable and disable replication
@@ -1372,66 +1370,61 @@
}
if (interactive)
{
- boolean confirmationLimitReached = false;
- while (suffixes.isEmpty())
- {
- boolean noSchemaOrAds = false;
- for (String s: availableSuffixes)
- {
- if (!Utils.areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(s, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
- {
- noSchemaOrAds = true;
- }
- }
- if (!noSchemaOrAds)
- {
- // In interactive mode we do not propose to manage the
- // administration suffix.
- println();
- println(ERR_NO_SUFFIXES_AVAILABLE_TO_PURGE_HISTORICAL.get());
- break;
- }
- else
- {
- println();
- println(ERR_NO_SUFFIXES_SELECTED_TO_PURGE_HISTORICAL.get());
- for (String dn : availableSuffixes)
- {
- if (!Utils.areDnsEqual(dn,
- ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
- {
- try
- {
- if (askConfirmation(
- INFO_REPLICATION_PURGE_HISTORICAL_PROMPT.get(dn), true,
- LOG))
- {
- suffixes.add(dn);
- }
- }
- catch (CLIException ce)
- {
- println(ce.getMessageObject());
- confirmationLimitReached = true;
- break;
- }
- }
- }
- }
- if (confirmationLimitReached)
- {
- suffixes.clear();
- break;
- }
- }
+ askConfirmations(suffixes, availableSuffixes,
+ ERR_NO_SUFFIXES_AVAILABLE_TO_PURGE_HISTORICAL,
+ ERR_NO_SUFFIXES_SELECTED_TO_PURGE_HISTORICAL,
+ INFO_REPLICATION_PURGE_HISTORICAL_PROMPT);
}
}
}
+ private void askConfirmations(Collection<String> suffixes,
+ Collection<String> availableSuffixes, Arg0 noSuffixAvailableMsg,
+ Arg0 noSuffixSelectedMsg, Arg1<CharSequence> confirmationMsgPromt)
+ {
+ boolean confirmationLimitReached = false;
+ while (suffixes.isEmpty())
+ {
+ if (!noSchemaOrAds(availableSuffixes))
+ {
+ // In interactive mode we do not propose to manage the
+ // administration suffix.
+ println();
+ println(noSuffixAvailableMsg.get());
+ break;
+ }
+
+ println();
+ println(noSuffixSelectedMsg.get());
+ confirmationLimitReached =
+ askConfirmations(confirmationMsgPromt, availableSuffixes, suffixes,
+ confirmationLimitReached);
+ if (confirmationLimitReached)
+ {
+ suffixes.clear();
+ break;
+ }
+ }
+ }
+
+ private boolean noSchemaOrAds(Collection<String> suffixes)
+ {
+ for (String suffix : suffixes)
+ {
+ if (isNotSchemaOrAds(suffix))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean isNotSchemaOrAds(String suffix)
+ {
+ return !Utils.areDnsEqual(suffix, ADSContext.getAdministrationSuffixDN())
+ && !Utils.areDnsEqual(suffix, Constants.SCHEMA_DN);
+ }
+
/**
* Based on the data provided in the command-line it initializes replication
* between two servers.
@@ -4913,62 +4906,10 @@
}
if (interactive)
{
- boolean confirmationLimitReached = false;
- while (suffixes.isEmpty())
- {
- boolean noSchemaOrAds = false;
- for (String s: availableSuffixes)
- {
- if (!Utils.areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(s, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
- {
- noSchemaOrAds = true;
- }
- }
- if (!noSchemaOrAds)
- {
- // In interactive mode we do not propose to manage the
- // administration suffix.
- println();
- println(
- ERR_NO_SUFFIXES_AVAILABLE_TO_ENABLE_REPLICATION.get());
- break;
- }
- else
- {
- println();
- println(ERR_NO_SUFFIXES_SELECTED_TO_REPLICATE.get());
- for (String dn : availableSuffixes)
- {
- if (!Utils.areDnsEqual(dn,
- ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
- {
- try
- {
- if (askConfirmation(
- INFO_REPLICATION_ENABLE_SUFFIX_PROMPT.get(dn), true, LOG))
- {
- suffixes.add(dn);
- }
- }
- catch (CLIException ce)
- {
- println(ce.getMessageObject());
- confirmationLimitReached = true;
- break;
- }
- }
- }
- }
- if (confirmationLimitReached)
- {
- suffixes.clear();
- break;
- }
- }
+ askConfirmations(suffixes, availableSuffixes,
+ ERR_NO_SUFFIXES_AVAILABLE_TO_ENABLE_REPLICATION,
+ ERR_NO_SUFFIXES_SELECTED_TO_REPLICATE,
+ INFO_REPLICATION_ENABLE_SUFFIX_PROMPT);
}
}
}
@@ -5095,17 +5036,7 @@
boolean confirmationLimitReached = false;
while (suffixes.isEmpty())
{
- boolean noSchemaOrAds = false;
- for (String s: availableSuffixes)
- {
- if (!Utils.areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(s, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
- {
- noSchemaOrAds = true;
- }
- }
- if (!noSchemaOrAds)
+ if (!noSchemaOrAds(availableSuffixes))
{
// In interactive mode we do not propose to manage the
// administration suffix.
@@ -5123,30 +5054,9 @@
println();
println(ERR_NO_SUFFIXES_SELECTED_TO_DISABLE.get());
}
- for (String dn : availableSuffixes)
- {
- if (!Utils.areDnsEqual(dn,
- ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
- {
- try
- {
- if (askConfirmation(
- INFO_REPLICATION_DISABLE_SUFFIX_PROMPT.get(dn), true,
- LOG))
- {
- suffixes.add(dn);
- }
- }
- catch (CLIException ce)
- {
- println(ce.getMessageObject());
- confirmationLimitReached = true;
- break;
- }
- }
- }
+ confirmationLimitReached =
+ askConfirmations(INFO_REPLICATION_DISABLE_SUFFIX_PROMPT,
+ availableSuffixes, suffixes, confirmationLimitReached);
}
if (confirmationLimitReached)
{
@@ -5162,6 +5072,32 @@
}
}
+ private boolean askConfirmations(Arg1<CharSequence> confirmationMsg,
+ Collection<String> availableSuffixes, Collection<String> suffixes,
+ boolean confirmationLimitReached)
+ {
+ for (String dn : availableSuffixes)
+ {
+ if (isNotSchemaOrAds(dn))
+ {
+ try
+ {
+ if (askConfirmation(confirmationMsg.get(dn), true, LOG))
+ {
+ suffixes.add(dn);
+ }
+ }
+ catch (CLIException ce)
+ {
+ println(ce.getMessageObject());
+ confirmationLimitReached = true;
+ break;
+ }
+ }
+ }
+ return confirmationLimitReached;
+ }
+
/**
* Checks that replication can actually be initialized in the provided baseDNs
* for the server.
@@ -5284,17 +5220,7 @@
boolean confirmationLimitReached = false;
while (suffixes.isEmpty())
{
- boolean noSchemaOrAds = false;
- for (String s: availableSuffixes)
- {
- if (!Utils.areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(s, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
- {
- noSchemaOrAds = true;
- }
- }
- if (!noSchemaOrAds)
+ if (!noSchemaOrAds(availableSuffixes))
{
// In interactive mode we do not propose to manage the
// administration suffix.
@@ -5330,10 +5256,7 @@
}
for (String dn : availableSuffixes)
{
- if (!Utils.areDnsEqual(dn,
- ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
+ if (isNotSchemaOrAds(dn))
{
boolean addSuffix;
try
@@ -5434,63 +5357,10 @@
}
if (interactive)
{
- boolean confirmationLimitReached = false;
- while (suffixes.isEmpty())
- {
- boolean noSchemaOrAds = false;
- for (String s: availableSuffixes)
- {
- if (!Utils.areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(s, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
- {
- noSchemaOrAds = true;
- }
- }
- if (!noSchemaOrAds)
- {
- // In interactive mode we do not propose to manage the
- // administration suffix.
- println();
- println(ERR_NO_SUFFIXES_AVAILABLE_TO_INITIALIZE_REPLICATION.get());
- break;
- }
- else
- {
- println();
- println(ERR_NO_SUFFIXES_SELECTED_TO_INITIALIZE.get());
-
- for (String dn : availableSuffixes)
- {
- if (!Utils.areDnsEqual(dn,
- ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
- {
- try
- {
- if (askConfirmation(
- INFO_REPLICATION_INITIALIZE_SUFFIX_PROMPT.get(dn), true,
- LOG))
- {
- suffixes.add(dn);
- }
- }
- catch (CLIException ce)
- {
- println(ce.getMessageObject());
- confirmationLimitReached = true;
- break;
- }
- }
- }
- }
- if (confirmationLimitReached)
- {
- suffixes.clear();
- break;
- }
- }
+ askConfirmations(suffixes, availableSuffixes,
+ ERR_NO_SUFFIXES_AVAILABLE_TO_INITIALIZE_REPLICATION,
+ ERR_NO_SUFFIXES_SELECTED_TO_INITIALIZE,
+ INFO_REPLICATION_INITIALIZE_SUFFIX_PROMPT);
}
}
}
@@ -6858,8 +6728,7 @@
// and cn=admin data.
boolean found = displayAll &&
!Utils.areDnsEqual(dn, ADSContext.getAdministrationSuffixDN()) &&
- !Utils.areDnsEqual(dn, Constants.SCHEMA_DN) &&
- !Utils.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN);
+ !Utils.areDnsEqual(dn, Constants.SCHEMA_DN);
for (String baseDN : userBaseDNs)
{
found = Utils.areDnsEqual(baseDN, dn);
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
index 9471505..329231c 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2013 ForgeRock AS
+ * Portions Copyright 2011-2014 ForgeRock AS
*/
package org.opends.server.replication;
@@ -38,14 +38,12 @@
import org.opends.server.backends.MemoryBackend;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.replication.common.CSNGenerator;
import org.opends.server.replication.common.ServerStatus;
import org.opends.server.replication.plugin.LDAPReplicationDomain;
import org.opends.server.replication.plugin.MultimasterReplication;
import org.opends.server.replication.protocol.*;
import org.opends.server.replication.server.ReplServerFakeConfiguration;
-import org.opends.server.replication.server.ReplicationBackend;
import org.opends.server.replication.server.ReplicationServer;
import org.opends.server.replication.server.ReplicationServerDomain;
import org.opends.server.replication.service.ReplicationBroker;
@@ -559,18 +557,7 @@
*/
private void checkChangelogSize(int expectedCount, int timeout) throws Exception
{
- long start = System.currentTimeMillis();
- InternalSearchOperation searchOperation;
- do
- {
- Thread.sleep(10);
- searchOperation = connection.processSearch(
- "dc=replicationchanges", SearchScope.SUBORDINATE_SUBTREE, "(objectclass=*)");
- }
- while (System.currentTimeMillis() - start <= timeout
- && searchOperation.getResultCode() != ResultCode.SUCCESS
- && searchOperation.getSearchEntries().size() != expectedCount);
- Assertions.assertThat(searchOperation.getSearchEntries()).hasSize(expectedCount);
+ throw new RuntimeException("Dead code. Should we remove this method and the test calling it?");
}
/**
@@ -581,7 +568,7 @@
public void testSingleRS() throws Exception
{
String testCase = "testSingleRS";
- debugInfo("Starting "+ testCase + " debugEnabled:" + debugEnabled());
+ debugInfo("Starting " + testCase + " debugEnabled:" + debugEnabled());
debugInfo(testCase + " Clearing DS1 backend");
// Special test were we want to test with an empty backend. So free it
@@ -597,21 +584,20 @@
// To search the replication server db later in these tests, we need
// to attach the search backend to the replication server just created.
- ReplicationBackend b =
- (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
- b.setServer(replServer1);
//===========================================================
debugInfo(testCase + " ** TEST ** Empty backend");
connectServer1ToReplServer(replServer1);
- debugInfo(testCase + " Expect genId to be not retrievable from suffix root entry");
+ debugInfo(testCase
+ + " Expect genId to be not retrievable from suffix root entry");
dsGenId = readGenIdFromSuffixRootEntry();
assertEquals(dsGenId,-1);
- debugInfo(testCase + " Expect genId to be set in memory on the replication " +
- " server side (not wrote on disk/db since no change occurred).");
+ debugInfo(testCase
+ + " Expect genId to be set in memory on the replication "
+ + " server side (not wrote on disk/db since no change occurred).");
rsGenId = replServer1.getGenerationId(baseDN);
assertEquals(rsGenId, EMPTY_DN_GENID);
@@ -619,7 +605,7 @@
disconnectFromReplServer(replServer1);
- //===========================================================
+ // ===========================================================
debugInfo(testCase + " ** TEST ** Non empty backend");
debugInfo(testCase + " Adding test entries to DS");
@@ -627,7 +613,8 @@
connectServer1ToReplServer(replServer1);
- debugInfo(testCase + " Test that the generationId is written in the DB in the root entry on DS1");
+ debugInfo(testCase
+ + " Test that the generationId is written in the DB in the root entry on DS1");
dsGenId = readGenIdFromSuffixRootEntry();
assertTrue(dsGenId != -1);
assertTrue(dsGenId != EMPTY_DN_GENID);
@@ -639,23 +626,29 @@
//===========================================================
debugInfo(testCase + " ** TEST ** DS2 connection to RS1 with bad genID");
- broker2 = openReplicationSession(baseDN, server2ID, 100,
- replServer1.getReplicationPort(), 1000, dsGenId+1);
+ broker2 =
+ openReplicationSession(baseDN, server2ID, 100, replServer1
+ .getReplicationPort(), 1000, dsGenId + 1);
- //===========================================================
+ // ===========================================================
debugInfo(testCase + " ** TEST ** DS3 connection to RS1 with good genID");
- broker3 = openReplicationSession(baseDN, server3ID, 100,
- replServer1.getReplicationPort(), 1000, dsGenId);
+ broker3 =
+ openReplicationSession(baseDN, server3ID, 100, replServer1
+ .getReplicationPort(), 1000, dsGenId);
- //===========================================================
- debugInfo(testCase + " ** TEST ** DS2 (bad genID) changes must be ignored.");
+ // ===========================================================
+ debugInfo(testCase
+ + " ** TEST ** DS2 (bad genID) changes must be ignored.");
broker2.publish(createAddMsg());
- assertNoMessageReceived(broker3, "broker3",
+ assertNoMessageReceived(
+ broker3,
+ "broker3",
"Note that timeout should be lower than RS monitoring publisher period so that timeout occurs");
- //===========================================================
- debugInfo(testCase + " ** TEST ** The part of the topology with the right gen ID should work well");
+ // ===========================================================
+ debugInfo(testCase
+ + " ** TEST ** The part of the topology with the right gen ID should work well");
// Now create a change that must be replicated
waitConnectionToReplicationDomain(baseDN, 1000);
@@ -685,9 +678,6 @@
// To search the replication server db later in these tests, we need
// to attach the search backend to the replication server just created.
- b = (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
- b.setServer(replServer1);
-
debugInfo("Delay to allow DS to reconnect to replServer1");
final long genIdAfterRestart = replServer1.getGenerationId(baseDN);
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
index 4ea2690..2be604a 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -359,16 +359,8 @@
assertNoConfigEntriesWithFilter("(objectclass=ds-cfg-replication-domain)",
"Found unexpected replication domain config left");
- // Check for config entries for replication changes backend
- assertNoConfigEntriesWithFilter(
- "(ds-cfg-java-class=org.opends.server.replication.server.ReplicationBackend)",
- "Found unexpected replication changes backend config left");
-
// Check for left domain object
assertEquals(MultimasterReplication.getNumberOfDomains(), 0, "Some replication domain objects left");
-
- // Check for left replication changes backend object
- assertEquals(DirectoryServer.getBackend("replicationChanges"), null, "Replication changes backend object has been left");
}
protected void clearChangelogDB(ReplicationServer rs) throws Exception
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
index 41e5763..d4ff462 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
@@ -26,8 +26,6 @@
*/
package org.opends.server.replication.server;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketTimeoutException;
@@ -39,8 +37,6 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyDNOperationBasis;
import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.protocols.internal.InternalSearchOperation;
-import org.opends.server.protocols.ldap.LDAPControl;
import org.opends.server.replication.ReplicationTestCase;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.CSNGenerator;
@@ -51,24 +47,16 @@
import org.opends.server.replication.plugin.ReplicationServerListener;
import org.opends.server.replication.protocol.*;
import org.opends.server.replication.service.ReplicationBroker;
-import org.opends.server.tools.LDAPModify;
-import org.opends.server.tools.LDAPSearch;
import org.opends.server.types.*;
-import org.opends.server.util.LDIFWriter;
import org.opends.server.util.TimeThread;
import org.opends.server.workflowelement.localbackend.LocalBackendModifyDNOperation;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
-import static java.util.Collections.*;
-
import static org.opends.server.TestCaseUtils.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.replication.protocol.OperationContext.*;
-import static org.opends.server.types.ResultCode.*;
-import static org.opends.server.types.SearchScope.*;
-import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.testng.Assert.*;
@@ -97,9 +85,6 @@
private CSN unknownCSNServer1;
- private static final String exportLDIFAllFile = "exportLDIF.ldif";
- private String exportLDIFDomainFile;
-
/**
* Set up the environment for performing the tests in this Class.
* Replication
@@ -162,7 +147,7 @@
* This method is used to make sure that this order is always respected.
* (Using testng dependency does not work)
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"})
+ @Test(enabled = true)
public void replicationServerTest() throws Exception
{
changelogBasic();
@@ -173,8 +158,6 @@
newClientWithChangefromServer2();
newClientWithUnknownChanges();
stopChangelog();
- exportBackend();
- backupRestore();
}
/**
@@ -185,7 +168,7 @@
* test is disabled and should only be enabled in workspaces but never
* committed in the repository.
*/
- @Test(enabled=false, dependsOnMethods = { "searchBackend"})
+ @Test(enabled=false)
public void replicationServerTestLoop() throws Exception
{
changelogBasic();
@@ -471,7 +454,7 @@
* This test is configured by a relatively low stress
* but can be changed using TOTAL_MSG and CLIENT_THREADS consts.
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"})
+ @Test(enabled = true)
public void oneWriterMultipleReader() throws Exception
{
debugInfo("Starting oneWriterMultipleReader");
@@ -551,7 +534,7 @@
* This test is configured for a relatively low stress
* but can be changed using TOTAL_MSG and THREADS consts.
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"}, groups = "opendj-256")
+ @Test(enabled = true, groups = "opendj-256")
public void multipleWriterMultipleReader() throws Exception
{
debugInfo("Starting multipleWriterMultipleReader");
@@ -635,7 +618,7 @@
* <li>Check that client 2 receives the changes published by client 1</li>
* </ol>
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"})
+ @Test(enabled = true)
public void changelogChaining0() throws Exception
{
final String tn = "changelogChaining0";
@@ -733,7 +716,7 @@
* <li>Check that client 2 receives the changes published by client 1</li>
* <ol>
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"})
+ @Test(enabled = true)
public void changelogChaining1() throws Exception
{
final String tn = "changelogChaining1";
@@ -855,7 +838,7 @@
* Test that the Replication sends back correctly WindowsUpdate
* when we send a WindowProbeMsg.
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"})
+ @Test(enabled = true)
public void windowProbeTest() throws Exception
{
debugInfo("Starting windowProbeTest");
@@ -1082,415 +1065,6 @@
}
}
- /**
- * Test backup and restore of the Replication server backend.
- */
- private void backupRestore() throws Exception
- {
- debugInfo("Starting backupRestore");
-
- executeTask(createBackupTask(), 20000);
- executeTask(createRestoreTask(), 20000);
-
- debugInfo("Ending backupRestore");
- }
-
- /**
- * Test export of the Replication server backend
- * - Creates 2 brokers connecting to the replication for 2 different baseDN
- * - Make these brokers publish changes to the replication server
- * - Launch a full export
- * - Launch a partial export on one of the 2 domains
- */
- private void exportBackend() throws Exception
- {
- debugInfo("Starting exportBackend");
-
- ReplicationBroker server1 = null;
- ReplicationBroker server2 = null;
-
- try
- {
- final DN baseDN2 = DN.decode("dc=domain2,dc=com");
- server1 = openReplicationSession(TEST_ROOT_DN, 1, 100, replicationServerPort, 1000);
- server2 = openReplicationSession(baseDN2, 2, 100, replicationServerPort, 1000);
-
- debugInfo("Publish changes");
- publishAll(server1, createChanges(TEST_ROOT_DN_STRING, 1));
- publishAll(server2, createChanges("dc=domain2,dc=com", 2));
-
- debugInfo("Export all");
- executeTask(createExportAllTask(), 20000);
- // Not doing anything with the export file, let's delete it
- new File(DirectoryServer.getInstanceRoot(), exportLDIFAllFile).delete();
-
- debugInfo("Export domain");
- executeTask(createExportDomainTask("dc=domain2,dc=com"), 20000);
- if (exportLDIFDomainFile != null)
- {
- // Not doing anything with the export file, let's delete it
- new File(DirectoryServer.getInstanceRoot(), exportLDIFDomainFile).delete();
- }
- }
- finally
- {
- stop(server1, server2);
- }
-
- debugInfo("Ending export");
- }
-
- private Entry createBackupTask() throws Exception
- {
- return TestCaseUtils.makeEntry(
- "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
- "objectclass: top",
- "objectclass: ds-task",
- "objectclass: ds-task-backup",
- "ds-task-class-name: org.opends.server.tasks.BackupTask",
- "ds-backup-directory-path: bak" + File.separator +
- "replicationChanges",
- "ds-task-backup-backend-id: replicationChanges");
- }
-
- private Entry createRestoreTask() throws Exception
- {
- return TestCaseUtils.makeEntry(
- "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
- "objectclass: top",
- "objectclass: ds-task",
- "objectclass: ds-task-restore",
- "ds-task-class-name: org.opends.server.tasks.RestoreTask",
- "ds-backup-directory-path: bak" + File.separator +
- "replicationChanges");
- }
-
- private Entry createExportAllTask() throws Exception
- {
- return TestCaseUtils.makeEntry(
- "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
- "objectclass: top",
- "objectclass: ds-task",
- "objectclass: ds-task-export",
- "ds-task-class-name: org.opends.server.tasks.ExportTask",
- "ds-task-export-ldif-file: " + exportLDIFAllFile,
- "ds-task-export-backend-id: replicationChanges",
- "ds-task-export-include-branch: dc=replicationChanges");
- }
-
- private Entry createExportDomainTask(String suffix) throws Exception
- {
- String root = suffix.substring(suffix.indexOf('=')+1, suffix.indexOf(','));
- exportLDIFDomainFile = "exportLDIF" + root +".ldif";
- return TestCaseUtils.makeEntry(
- "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
- "objectclass: top",
- "objectclass: ds-task",
- "objectclass: ds-task-export",
- "ds-task-class-name: org.opends.server.tasks.ExportTask",
- "ds-task-export-ldif-file: " + exportLDIFDomainFile,
- "ds-task-export-backend-id: replicationChanges",
- "ds-task-export-include-branch: "+suffix+",dc=replicationChanges");
- }
-
- private List<UpdateMsg> createChanges(String suffix, int serverId) throws Exception
- {
- List<UpdateMsg> l = new ArrayList<UpdateMsg>();
-
- {
- String user1entryUUID = "33333333-3333-3333-3333-333333333333";
- String baseUUID = "22222222-2222-2222-2222-222222222222";
-
- // - Add
- Entry entry = TestCaseUtils.entryFromLdifString(
- "dn: "+suffix+"\n"
- + "objectClass: top\n"
- + "objectClass: domain\n"
- + "entryUUID: 11111111-1111-1111-1111-111111111111\n");
- CSNGenerator csnGen = new CSNGenerator(serverId, TimeThread.getTime());
- DN exampleSuffixDN = DN.decode("o=example," + suffix);
- AddMsg addMsg = new AddMsg(csnGen.newCSN(), exampleSuffixDN,
- user1entryUUID, baseUUID, entry.getObjectClassAttribute(),
- entry.getAttributes(), new ArrayList<Attribute>());
- l.add(addMsg);
-
- // - Add
- Entry uentry = TestCaseUtils.entryFromLdifString(
- "dn: cn=Fiona Jensen,ou=People,"+suffix+"\n"
- + "objectClass: top\n"
- + "objectclass: person\n"
- + "objectclass: organizationalPerson\n"
- + "objectclass: inetOrgPerson\n"
- + "cn: Fiona Jensen\n"
- + "sn: Jensen\n"
- + "givenName: fjensen\n"
- + "telephonenumber: +1 408 555 1212\n"
- + "entryUUID: " + user1entryUUID +"\n"
- + "userpassword: fjen$$en" + "\n");
- DN newPersonDN = DN.decode("uid=new person,ou=People,"+suffix);
- AddMsg addMsg2 = new AddMsg(
- csnGen.newCSN(),
- newPersonDN,
- user1entryUUID,
- baseUUID,
- uentry.getObjectClassAttribute(),
- uentry.getAttributes(),
- new ArrayList<Attribute>());
- l.add(addMsg2);
-
- // - Modify
- Attribute attr1 = Attributes.create("description", "new value");
- Attribute attr2 = Attributes.create("modifiersName", "cn=Directory Manager,cn=Root DNs,cn=config");
- Attribute attr3 = Attributes.create("modifyTimestamp", "20070917172420Z");
-
- List<Modification> mods = Arrays.asList(
- new Modification(ModificationType.REPLACE, attr1),
- new Modification(ModificationType.REPLACE, attr2),
- new Modification(ModificationType.REPLACE, attr3));
-
- DN dn = exampleSuffixDN;
- ModifyMsg modMsg = new ModifyMsg(csnGen.newCSN(), dn, mods, "fakeuniqueid");
- l.add(modMsg);
-
- // Modify DN
- ModifyDNMsg modDnMsg = new ModifyDNMsg(newPersonDN, csnGen.newCSN(),
- user1entryUUID, baseUUID, false,
- "uid=wrong, ou=people,"+suffix, "uid=newrdn");
- l.add(modDnMsg);
-
- // Del
- DeleteMsg delMsg = new DeleteMsg(exampleSuffixDN, csnGen.newCSN(), "uid");
- l.add(delMsg);
- }
- return l;
- }
-
-
- /**
- * Testing searches on the backend of the replication server.
- * @throws Exception
- */
- @Test(enabled=true)
- public void searchBackend() throws Exception
- {
- debugInfo("Starting searchBackend");
-
- ReplicationBroker server1 = null;
- try
- {
- InternalSearchOperation op =
- connection.processSearch("cn=monitor", WHOLE_SUBTREE, "(objectclass=*)");
- assertEquals(op.getResultCode(), SUCCESS, op.getErrorMessage().toString());
-
- clearChangelogDB(replicationServer);
-
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- LDIFExportConfig exportConfig = new LDIFExportConfig(stream);
- LDIFWriter ldifWriter = new LDIFWriter(exportConfig);
-
- debugInfo("Create broker");
- server1 = openReplicationSession(TEST_ROOT_DN, 1, 100, replicationServerPort, 1000);
-
- debugInfo("Publish changes");
- List<UpdateMsg> msgs = createChanges(TEST_ROOT_DN_STRING, 1);
- publishAll(server1, msgs);
- Thread.sleep(500);
-
- // Sets manually the association backend-replication server since
- // no config object exist for our replication server.
- ReplicationBackend b =
- (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
- b.setServer(replicationServer);
- assertEquals(b.getEntryCount(), msgs.size());
- assertTrue(b.entryExists(DN.decode("dc=replicationChanges")));
- SearchFilter filter=SearchFilter.createFilterFromString("(objectclass=*)");
- assertTrue(b.isIndexed(filter));
-
- List<Control> requestControls = new LinkedList<Control>();
- requestControls.add(new LDAPControl(OID_INTERNAL_GROUP_MEMBERSHIP_UPDATE, false));
- DN baseDN=DN.decode("dc=replicationChanges");
- //Test the group membership control causes search to be skipped.
- InternalSearchOperation internalSearch =
- connection.processSearch(baseDN, WHOLE_SUBTREE,
- DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, filter, null,
- requestControls, null);
- assertEquals(internalSearch.getResultCode(), ResultCode.SUCCESS);
- assertTrue(internalSearch.getSearchEntries().isEmpty());
-
- assertSearchResult("dc=oops", "(changetype=*)", NO_SUCH_OBJECT, 0);
-
- // TODO: testReplicationBackendACIs() is disabled because it
- // is currently failing when run in the nightly target.
- // anonymous search returns entries from replication backend whereas it
- // should not. Probably a previous test in the nightlytests suite is
- // removing/modifying some ACIs...When problem found, we have to re-enable
- // this test.
- // testReplicationBackendACIs();
-
- op = assertSearchResult("dc=replicationChanges", "(changetype=*)", SUCCESS, 5);
-
- debugInfo("Search result");
- List<SearchResultEntry> entries = op.getSearchEntries();
- if (entries != null)
- {
- for (SearchResultEntry entry : entries)
- {
- debugInfo(entry.toLDIFString());
- ldifWriter.writeEntry(entry);
- }
- }
- debugInfo("\n" + stream.toString());
-
-
- debugInfo("Query / filter based on changetype");
-
- assertSearchResult("dc=replicationChanges", "(changetype=add)", SUCCESS, 2);
- assertSearchResult("dc=replicationChanges", "(changetype=modify)", SUCCESS, 1);
- assertSearchResult("dc=replicationChanges", "(changetype=moddn)", SUCCESS, 1);
- assertSearchResult("dc=replicationChanges", "(changetype=delete)", SUCCESS, 1);
-
- debugInfo("Query / filter based on objectclass");
-
- assertSearchResult("dc=replicationChanges", "(objectclass=person)", SUCCESS, 1);
-
- /*
- * It would be nice to be have the abilities to search for
- * entries in the replication backend using the DN on which the
- * operation was done as the search criteria.
- * This is not possible yet, this part of the test is therefore
- * disabled.
- *
- * debugInfo("Query / searchBase");
- * op = connection.processSearch(
- * ByteString.valueOf("uid=new person,ou=People,dc=example,dc=com,dc=replicationChanges"),
- * SearchScope.WHOLE_SUBTREE,
- * LDAPFilter.decode("(changetype=*)"));
- * assertEquals(op.getResultCode(), ResultCode.SUCCESS);
- * assertEquals(op.getSearchEntries().size(), 2);
- */
-
- debugInfo("Query / 1 attrib");
-
- op = connection.processSearch("dc=replicationChanges",
- WHOLE_SUBTREE, DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
- "(changetype=moddn)", singleton("newrdn"));
- assertEquals(op.getResultCode(), ResultCode.SUCCESS);
- assertEquals(op.getSearchEntries().size(), 1);
- entries = op.getSearchEntries();
- if (entries != null)
- {
- for (SearchResultEntry entry : entries)
- {
- debugInfo(entry.toLDIFString());
- ldifWriter.writeEntry(entry);
- }
- }
-
- debugInfo("Query / All attribs");
-
- op = connection.processSearch("dc=replicationChanges",
- WHOLE_SUBTREE, DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
- "(changetype=*)", singleton("*"));
- assertEquals(op.getResultCode(), ResultCode.SUCCESS);
- assertEquals(op.getSearchEntries().size(), 5);
-
- debugInfo("Successfully ending searchBackend");
- } finally {
- stop(server1);
- }
- }
-
- private void publishAll(ReplicationBroker broker, List<UpdateMsg> msgs)
- {
- for (UpdateMsg msg : msgs)
- {
- broker.publish(msg);
- }
- }
-
- private InternalSearchOperation assertSearchResult(String baseDN,
- String filterString, ResultCode rc, int nbEntriesReturned)
- throws Exception
- {
- InternalSearchOperation op =
- connection.processSearch(baseDN, WHOLE_SUBTREE, filterString);
- assertEquals(op.getResultCode(), rc, op.getErrorMessage().toString());
- if (SUCCESS.equals(rc))
- {
- assertEquals(op.getSearchEntries().size(), nbEntriesReturned);
- }
- return op;
- }
-
- private void testReplicationBackendACIs() throws Exception
- {
- ByteArrayOutputStream oStream = new ByteArrayOutputStream();
- ByteArrayOutputStream eStream = new ByteArrayOutputStream();
-
- // test search as anonymous
- String[] args =
- {
- "-h", "127.0.0.1",
- "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
- "-b", "dc=replicationChanges",
- "-s", "sub",
- "--noPropertiesFile",
- "(objectClass=*)"
- };
-
- oStream.reset();
- eStream.reset();
- int retVal = LDAPSearch.mainSearch(args, false, oStream, eStream);
- String entries = oStream.toString();
-
- debugInfo("Entries:" + entries);
- assertEquals(0, retVal, "Returned error: " + eStream);
- assertEquals(entries, "", "Returned entries: " + entries);
-
- // test search as directory manager returns content
- String[] args3 =
- {
- "-h", "127.0.0.1",
- "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
- "-D", "cn=Directory Manager",
- "-w", "password",
- "-b", "dc=replicationChanges",
- "-s", "sub",
- "--noPropertiesFile",
- "(objectClass=*)"
- };
-
- oStream.reset();
- eStream.reset();
- retVal = LDAPSearch.mainSearch(args3, false, oStream, eStream);
- entries = oStream.toString();
-
- debugInfo("Entries:" + entries);
- assertEquals(0, retVal, "Returned error: " + eStream);
- assertTrue(!entries.equalsIgnoreCase(""), "Returned entries: " + entries);
-
- // test write fails : unwilling to perform
- String ldif =
- "dn: dc=foo, dc=replicationchanges\n"
- + "objectclass: top\n"
- + "objectClass: domain\n"
- + "dc:foo\n";
- String path = TestCaseUtils.createTempFile(ldif);
- String[] args4 =
- {
- "-h", "127.0.0.1",
- "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
- "-D", "cn=Directory Manager",
- "-w", "password",
- "--noPropertiesFile",
- "-a",
- "-f", path
- };
-
- retVal = LDAPModify.mainModify(args4, false, oStream, eStream);
- assertEquals(retVal, 53, "Returned error: " + eStream);
- }
-
/**
* Replication Server configuration test of the replication Server code with
* 2 replication servers involved
@@ -1509,7 +1083,7 @@
* - Make client 1 publish a change
* - Check that client 2 does not receive the change
*/
- @Test(enabled=true, dependsOnMethods = { "searchBackend"}, groups = "opendj-256")
+ @Test(enabled = true, groups = "opendj-256")
public void replicationServerConnected() throws Exception
{
clearChangelogDB(replicationServer);
--
Gitblit v1.10.0