mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
30.21.2011 4d0faf5b8ad46e978a72d35a8f736f83fb61fd2d
Fix issue OpenDJ-96: Replication server monitor data computation takes too long / blocks rest of server when another RS is cannot be reached
15 files modified
1854 ■■■■ changed files
opends/src/messages/messages/replication.properties 17 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_de.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_es.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_fr.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_ja.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_ko.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_zh_CN.properties 16 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication_zh_TW.properties 16 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DataServerHandler.java 78 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java 89 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/MessageHandler.java 13 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/MonitoringPublisher.java 91 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 758 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 655 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 41 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -257,13 +258,13 @@
  export-ldif command must be run as a task
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=SSL connection attempt from %s (%s) \
  failed: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Monitor data of remote servers \
 are missing due to an error in the retrieval process. Potentially a server \
 is too slow to provide its monitoring data over the protocol
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
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=Exception raised when \
 sending request to get remote monitor data
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 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 \
@@ -276,8 +277,8 @@
for domain %s : %s
SEVERE_ERR_COMPUTING_FAKE_OPS_115=Caught exception computing fake operations \
for domain %s for replication server %s : %s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Some monitor data have been received \
 from the server with server ID %s too late and are ignored
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
NOTICE_SERVER_STATE_RECOVERY_117=ServerState recovery for domain %s, \
updated with changeNumber %s
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=For replicated domain %s, in \
@@ -497,3 +498,5 @@
 changes with same changeNumber=%s. Previous msg=<%s>, New msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=Error while trying to solve conflict \
 with DN : %s ERROR : %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_de.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -147,9 +148,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=SSL-Verbindungsversuch von %s (%s) fehlgeschlagen: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u00dcberwachungsdaten des Remote-Servers fehlen aufgrund eines Fehlers beim Abrufprozess Ein Server ist m\u00f6glicherweise zu langsam, um seine \u00dcberwachungsdaten \u00fcber das Protokoll anzugeben
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u00dcberwachungsdaten des Remote-Servers fehlen aufgrund eines Fehlers beim Abrufprozess Ein Server ist m\u00f6glicherweise zu langsam, um seine \u00dcberwachungsdaten \u00fcber das Protokoll anzugeben
SEVERE_ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u00dcberwachungsdaten der Remote-Server fehlen aufgrund eines Verarbeitungsfehlers : %s
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Beim Senden der Anforderung zum Erhalt von Remote-\u00dcberwachungsdaten ist eine Ausnahme aufgetreten
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Beim Senden der Anforderung zum Erhalt von Remote-\u00dcberwachungsdaten ist eine Ausnahme aufgetreten
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
@@ -157,7 +163,9 @@
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
SEVERE_ERR_COMPUTING_FAKE_OPS_115=Aufgefangene Ausnahme berechnet Scheinvorg\u00e4nge f\u00fcr Dom\u00e4ne %s f\u00fcr Replikationsserver %s : %s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Einige \u00dcberwachungsdaten wurden vom Server mit der Server-ID %s zu sp\u00e4t empfangen und werden ignoriert
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Einige \u00dcberwachungsdaten wurden vom Server mit der Server-ID %s zu sp\u00e4t empfangen und werden ignoriert
NOTICE_SERVER_STATE_RECOVERY_117=ServerState-Wiederherstellung f\u00fcr Dom\u00e4ne %s, aktualisiert mit changeNumber %s
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=F\u00fcr die replizierte Dom\u00e4ne %s auf dem Server mit der Server-ID=%s konnte die Generations-ID nicht auf den Wert "%s" in der \u00fcbrigen Topologie gesetzt werden, weil der Server NICHT mit einem Replikationsserver verbunden ist. \u00dcberpr\u00fcfen Sie in der Konfiguration, dass die Dom\u00e4ne aktiviert und ein Replikationsserver eingerichtet und aktiv ist
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=Aufgefangene Ausnahme w\u00e4hrend der anf\u00e4nglichen Kommunikation (Phase %s) auf Dom\u00e4ne %s mit Replikationsserver %s : %s
@@ -244,3 +252,5 @@
NOTICE_ERR_WHILE_TRYING_TO_DECODE_RUV_IN_STATE_200=Fehler beim Versuch, RUV in Status f\u00fcr Suffix %s zu \u00fcbersetzen
SEVERE_ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Verarbeitung von zwei verschiedenen \u00c4nderungen mit derselben changeNumber=%s. Vorherige msg=<%s>, Neue msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=Fehler beim Versuch, Konflikt mit DN zu l\u00f6sen: %s FEHLER : %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_es.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -147,9 +148,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=Error en el intento de conexi\u00f3n SSL desde %s (%s): %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Faltan los datos de supervisi\u00f3n de los servidores remotos debido a un error en el proceso de recuperaci\u00f3n. Potencialmente, un servidor es demasiado lento como para proporcionar sus datos de supervisi\u00f3n por medio del protocolo
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Faltan los datos de supervisi\u00f3n de los servidores remotos debido a un error en el proceso de recuperaci\u00f3n. Potencialmente, un servidor es demasiado lento como para proporcionar sus datos de supervisi\u00f3n por medio del protocolo
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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Se ha producido una excepci\u00f3n al enviar la solicitud para obtener los datos de supervisi\u00f3n remotos
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Se ha producido una excepci\u00f3n al enviar la solicitud para obtener los datos de supervisi\u00f3n remotos
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
@@ -157,7 +163,9 @@
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
SEVERE_ERR_COMPUTING_FAKE_OPS_115=Se ha detectado una excepci\u00f3n al calcular operaciones falsas para el dominio %s para el servidor de repetici\u00f3n %s: %s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Se han recibido datos de supervisi\u00f3n desde el servidor con el ID de servidor %s demasiado tarde y se han ignorado
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Se han recibido datos de supervisi\u00f3n desde el servidor con el ID de servidor %s demasiado tarde y se han ignorado
NOTICE_SERVER_STATE_RECOVERY_117=Recuperaci\u00f3n del estado de servidor para el dominio %s actualizada con el n\u00famero de cambio %s
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=Para el dominio repetido %s, en el servidor con ID. de servidor=%s, el Id. de generaci\u00f3n no se pudo configurar con el valor %s en el resto de la topolog\u00eda porque este servidor NO est\u00e1 conectado con ning\u00fan servidor de repetici\u00f3n. Debe comprobar en la configuraci\u00f3n que el dominio est\u00e9 habilitado y que est\u00e9 funcionando un servidor de repetici\u00f3n
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=Se ha detectado una excepci\u00f3n durante la comunicaci\u00f3n inicial (fase %s) en el dominio %s con el servidor de repetici\u00f3n %s: %s
@@ -244,3 +252,5 @@
NOTICE_ERR_WHILE_TRYING_TO_DECODE_RUV_IN_STATE_200=Error al intentar convertir RUV en un estado para el sufijo %s
SEVERE_ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Procesando dos cambios diferentes con el mismo n\u00famero de cambio changeNumber=%s. Anterior msg=<%s>, Nuevo msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=Error al tratar de solucionar el conflicto con DN: %s ERROR : %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_fr.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -147,9 +148,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=\u00c9chec de la tentative de connexion SSL depuis %s (%s)\u00a0: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Les donn\u00e9es de contr\u00f4le des serveurs distants sont manquantes en raison d'une erreur dans le processus de r\u00e9cup\u00e9ration. Un serveur est potentiellement trop lent pour fournir ses donn\u00e9es de contr\u00f4le via le protocole
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Les donn\u00e9es de contr\u00f4le des serveurs distants sont manquantes en raison d'une erreur dans le processus de r\u00e9cup\u00e9ration. Un serveur est potentiellement trop lent pour fournir ses donn\u00e9es de contr\u00f4le via le protocole
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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Exception \u00e9mise lors de l'envoi d'une requ\u00eate d'obtention des donn\u00e9es de contr\u00f4le distantes
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Exception \u00e9mise lors de l'envoi d'une requ\u00eate d'obtention des donn\u00e9es de contr\u00f4le distantes
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
@@ -157,7 +163,9 @@
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
SEVERE_ERR_COMPUTING_FAKE_OPS_115=Exception d\u00e9tect\u00e9e lors du traitement d'op\u00e9rations factices pour le domaine %s pour le serveur de r\u00e9plication %s\u00a0: %s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Certaines donn\u00e9es de contr\u00f4le ont \u00e9t\u00e9 re\u00e7ues depuis le serveur avec l'ID serveur %s trop tardivement et sont ignor\u00e9es
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Certaines donn\u00e9es de contr\u00f4le ont \u00e9t\u00e9 re\u00e7ues depuis le serveur avec l'ID serveur %s trop tardivement et sont ignor\u00e9es
NOTICE_SERVER_STATE_RECOVERY_117=R\u00e9cup\u00e9ration ServerState pour le domaine %s, mis \u00e0 jour avec changeNumber %s
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=Pour le domaine r\u00e9pliqu\u00e9 %s, dans le serveur muni de l'identifiant serverId=%s, l'identifiant de g\u00e9n\u00e9ration n'a pas pu \u00eatre d\u00e9fini sur la valeur %s dans la reste de la topologie, car ce serveur n'est PAS connect\u00e9 \u00e0 un serveur de r\u00e9plication. Vous devez v\u00e9rifier dans la configuration si le domaine est bien activ\u00e9 et qu'un serveur de r\u00e9plication est bien en cours d'ex\u00e9cution
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=Exception d\u00e9tect\u00e9e lors de la communication initiale (phase %s) pour le domaine %s avec le serveur de r\u00e9plication %s\u00a0: %s
@@ -244,3 +252,5 @@
NOTICE_ERR_WHILE_TRYING_TO_DECODE_RUV_IN_STATE_200=Une erreur s'est produite lors de la tentative de conversion du vecteur de mise \u00e0 jour de r\u00e9plication (UV) en \u00e9tat pour le suffixe %s
SEVERE_ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Traitement de deux modifications diff\u00e9rentes ayant le m\u00eame param\u00e8tre changeNumber=%s. Pr\u00e9c\u00e9dent msg=<%s>, Nouveau msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=Une erreur est survenue lors de la tentative de r\u00e9solution d'un conflit avec le DN\u00a0: %s ERREUR : %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_ja.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -147,9 +148,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=%s (%s) \u304b\u3089\u306e SSL \u63a5\u7d9a\u8a66\u884c\u304c\u5931\u6557\u3057\u307e\u3057\u305f: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u53d6\u5f97\u51e6\u7406\u3067\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\u3002\u30d7\u30ed\u30c8\u30b3\u30eb\u7d4c\u7531\u3067\u76e3\u8996\u30c7\u30fc\u30bf\u3092\u63d0\u4f9b\u3059\u308b\u306b\u306f\u30b5\u30fc\u30d0\u30fc\u304c\u9045\u3059\u304e\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u53d6\u5f97\u51e6\u7406\u3067\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\u3002\u30d7\u30ed\u30c8\u30b3\u30eb\u7d4c\u7531\u3067\u76e3\u8996\u30c7\u30fc\u30bf\u3092\u63d0\u4f9b\u3059\u308b\u306b\u306f\u30b5\u30fc\u30d0\u30fc\u304c\u9045\u3059\u304e\u308b\u53ef\u80fd\u6027\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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u30ea\u30e2\u30fc\u30c8\u76e3\u8996\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u8981\u6c42\u3092\u9001\u4fe1\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u30ea\u30e2\u30fc\u30c8\u76e3\u8996\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u8981\u6c42\u3092\u9001\u4fe1\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f
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
@@ -157,7 +163,9 @@
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
SEVERE_ERR_COMPUTING_FAKE_OPS_115=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc %2$s \u306e\u30c9\u30e1\u30a4\u30f3 %1$s \u306b\u5bfe\u3059\u308b\u7591\u4f3c\u64cd\u4f5c\u3092\u8a08\u7b97\u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %3$s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u30b5\u30fc\u30d0\u30fc ID %s \u306e\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d7\u4fe1\u3057\u305f\u4e00\u90e8\u306e\u76e3\u8996\u30c7\u30fc\u30bf\u306f\u3001\u9045\u5ef6\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\u306b\u7121\u8996\u3055\u308c\u307e\u3059
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u30b5\u30fc\u30d0\u30fc ID %s \u306e\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d7\u4fe1\u3057\u305f\u4e00\u90e8\u306e\u76e3\u8996\u30c7\u30fc\u30bf\u306f\u3001\u9045\u5ef6\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\u306b\u7121\u8996\u3055\u308c\u307e\u3059
NOTICE_SERVER_STATE_RECOVERY_117=\u30c9\u30e1\u30a4\u30f3 %s \u306e ServerState \u306e\u5fa9\u5143\u304c\u3001changeNumber %s \u3067\u66f4\u65b0\u3055\u308c\u307e\u3057\u305f
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u305f\u30c9\u30e1\u30a4\u30f3 %s \u306e serverId=%s \u306e\u30b5\u30fc\u30d0\u30fc\u3067\u3001\u30c8\u30dd\u30ed\u30b8\u306e\u6b8b\u308a\u306e\u90e8\u5206\u306e\u751f\u6210 ID \u3092\u5024 %s \u306b\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u3069\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306b\u3082\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u8a2d\u5b9a\u3067\u3001\u30c9\u30e1\u30a4\u30f3\u304c\u6709\u52b9\u3067\u3042\u308b\u3053\u3068\u304a\u3088\u3073 1 \u3064\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3057\u3001\u7a3c\u50cd\u4e2d\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc %3$s \u3092\u542b\u3080\u30c9\u30e1\u30a4\u30f3 %2$s \u3067\u521d\u671f\u901a\u4fe1 (\u30d5\u30a7\u30fc\u30ba %1$s) \u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %4$s
@@ -244,3 +252,5 @@
NOTICE_ERR_WHILE_TRYING_TO_DECODE_RUV_IN_STATE_200=RUV \u3092\u30b5\u30d5\u30a3\u30c3\u30af\u30b9 %s \u306e\u72b6\u614b\u306b\u5909\u63db\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
SEVERE_ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=2 \u3064\u306e\u7570\u306a\u308b\u5909\u66f4\u3092\u540c\u3058 changeNumber=%s \u3067\u51e6\u7406\u3057\u3066\u3044\u307e\u3059\u3002\u4ee5\u524d\u306e msg=<%s>\u3001\u65b0\u3057\u3044 msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=DN \u306e\u7af6\u5408\u3092\u89e3\u6c7a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f : %s \u30a8\u30e9\u30fc : %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_ko.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2008 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -148,9 +149,14 @@
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.
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=%s(%s)\uc5d0\uc11c SSL \uc5f0\uacb0 \uc2dc\ub3c4\uac00 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\uac80\uc0c9 \ud504\ub85c\uc138\uc2a4\uc5d0 \uc624\ub958\uac00 \uc788\uc5b4\uc11c \uc6d0\uaca9 \uc11c\ubc84\uc758 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc11c\ubc84\uac00 \ub108\ubb34 \ub290\ub824\uc11c \ud504\ub85c\ud1a0\ucf5c\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \ubaa8\ub2c8\ud130\ub9c1\uc744 \uc81c\uacf5\ud560 \uc218 \uc5c6\ub294 \uac83 \uac19\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\uac80\uc0c9 \ud504\ub85c\uc138\uc2a4\uc5d0 \uc624\ub958\uac00 \uc788\uc5b4\uc11c \uc6d0\uaca9 \uc11c\ubc84\uc758 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc11c\ubc84\uac00 \ub108\ubb34 \ub290\ub824\uc11c \ud504\ub85c\ud1a0\ucf5c\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \ubaa8\ub2c8\ud130\ub9c1\uc744 \uc81c\uacf5\ud560 \uc218 \uc5c6\ub294 \uac83 \uac19\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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\uc6d0\uaca9 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\uae30 \uc704\ud55c \uc694\uccad\uc744 \uc804\uc1a1\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\uc6d0\uaca9 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\uae30 \uc704\ud55c \uc694\uccad\uc744 \uc804\uc1a1\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.
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.
@@ -158,7 +164,9 @@
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_PUBLISHING_FAKE_OPS_114=Caught exception publishing fake operations for domain %s : %s
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
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\uc11c\ubc84 \uc544\uc774\ub514\uac00 %s\uc778 \uc11c\ubc84\ub85c\ubd80\ud130 \uc77c\ubd80 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\ub97c \ubc1b\uc558\uc9c0\ub9cc \ub108\ubb34 \ub2a6\uc5c8\uae30 \ub54c\ubb38\uc5d0 \ubb34\uc2dc\ub429\ub2c8\ub2e4.
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\uc11c\ubc84 \uc544\uc774\ub514\uac00 %s\uc778 \uc11c\ubc84\ub85c\ubd80\ud130 \uc77c\ubd80 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\ub97c \ubc1b\uc558\uc9c0\ub9cc \ub108\ubb34 \ub2a6\uc5c8\uae30 \ub54c\ubb38\uc5d0 \ubb34\uc2dc\ub429\ub2c8\ub2e4.
NOTICE_SERVER_STATE_RECOVERY_117=%s \ub3c4\uba54\uc778\uc5d0 \ub300\ud55c ServerState \ubcf5\uad6c\uac00 changeNumber %s(\uc73c)\ub85c \uc5c5\ub370\uc774\ud2b8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=%s \ub3c4\uba54\uc778\uc774 \ubcf5\uc81c\uc5d0 \uc5f0\uacb0\ub418\uc5b4 \uc788\uc9c0 \uc54a\uae30 \ub54c\ubb38\uc5d0 \uc774 \ub3c4\uba54\uc778\uc5d0 \ub300\ud55c \uc0dd\uc131 \uc544\uc774\ub514\ub97c \ub2e4\uc2dc \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uad6c\uc131\uc5d0\uc11c \ub3c4\uba54\uc778\uc774 \ud65c\uc131\ud654\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud574\uc57c \ud569\ub2c8\ub2e4.
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=Caught Exception during initial communication (phase %s) on domain %s with replication server %s : %s
@@ -215,3 +223,5 @@
NOTICE_ERR_FULL_UPDATE_IMPORT_FRACTIONAL_REMOTE_IS_FRACTIONAL_170=The online full update for importing suffix %s data from remote directory server %s has been stopped due to fractional configuration inconsistency between destination and source server : imported data set has some fractional configuration but not destination server
NOTICE_ERR_FRACTIONAL_FORBIDDEN_OPERATION_171=The following operation has been forbidden in suffix %s due to inconsistency with the fractional replication configuration : %s
NOTICE_ERR_FRACTIONAL_FORBIDDEN_FULL_UPDATE_FRACTIONAL_172=The export of domain %s from server %s to all other servers of the topology is forbidden as the source server has some fractional configuration : only fractional servers in a replicated topology does not makes sense
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_zh_CN.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -147,9 +148,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=\u4e0e %s (%s) \u7684 SSL \u8fde\u63a5\u5c1d\u8bd5\u5931\u8d25: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u7531\u4e8e\u68c0\u7d22\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u9519\u8bef\uff0c\u56e0\u6b64\u4e22\u5931\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76d1\u89c6\u6570\u636e\u3002\u6709\u53ef\u80fd\u56e0\u670d\u52a1\u5668\u592a\u6162\u4ee5\u81f4\u4e0d\u80fd\u901a\u8fc7\u534f\u8bae\u63d0\u4f9b\u5176\u76d1\u89c6\u6570\u636e
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u7531\u4e8e\u68c0\u7d22\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u9519\u8bef\uff0c\u56e0\u6b64\u4e22\u5931\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76d1\u89c6\u6570\u636e\u3002\u6709\u53ef\u80fd\u56e0\u670d\u52a1\u5668\u592a\u6162\u4ee5\u81f4\u4e0d\u80fd\u901a\u8fc7\u534f\u8bae\u63d0\u4f9b\u5176\u76d1\u89c6\u6570\u636e
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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u8fdc\u7a0b\u76d1\u89c6\u6570\u636e\u65f6\u51fa\u73b0\u5f02\u5e38
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u8fdc\u7a0b\u76d1\u89c6\u6570\u636e\u65f6\u51fa\u73b0\u5f02\u5e38
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
@@ -157,7 +163,9 @@
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
SEVERE_ERR_COMPUTING_FAKE_OPS_115=\u8ba1\u7b97\u590d\u5236\u670d\u52a1\u5668 %2$s \u7684\u57df %1$s \u7684\u865a\u5047\u64cd\u4f5c\u65f6\u6355\u83b7\u5230\u5f02\u5e38: %3$s
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u4ece\u670d\u52a1\u5668 ID \u4e3a %s \u7684\u670d\u52a1\u5668\u4e2d\u63a5\u6536\u5230\u67d0\u4e9b\u76d1\u89c6\u6570\u636e\u7684\u65f6\u95f4\u8f83\u665a\uff0c\u5df2\u5ffd\u7565\u8fd9\u4e9b\u6570\u636e
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u4ece\u670d\u52a1\u5668 ID \u4e3a %s \u7684\u670d\u52a1\u5668\u4e2d\u63a5\u6536\u5230\u67d0\u4e9b\u76d1\u89c6\u6570\u636e\u7684\u65f6\u95f4\u8f83\u665a\uff0c\u5df2\u5ffd\u7565\u8fd9\u4e9b\u6570\u636e
NOTICE_SERVER_STATE_RECOVERY_117=\u57df %s \u7684\u670d\u52a1\u5668\u72b6\u6001\u6062\u590d\uff0c\u4f7f\u7528\u66f4\u6539\u53f7 %s \u8fdb\u884c\u4e86\u66f4\u65b0
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=\u5bf9\u4e8e\u590d\u5236\u7684\u57df %s\uff0c\u5728\u670d\u52a1\u5668 ID \u4e3a %s \u7684\u670d\u52a1\u5668\u4e2d\uff0c\u65e0\u6cd5\u5728\u5269\u4f59\u7684\u62d3\u6251\u4e2d\u5c06\u751f\u6210 ID \u8bbe\u7f6e\u4e3a\u503c %s\uff0c\u56e0\u4e3a\u8be5\u670d\u52a1\u5668\u672a\u8fde\u63a5\u5230\u4efb\u4f55\u590d\u5236\u670d\u52a1\u5668\u3002\u60a8\u5e94\u7b7e\u5165\u5df2\u542f\u7528\u57df\u4e14\u6709\u4e00\u4e2a\u590d\u5236\u670d\u52a1\u5668\u5df2\u5f00\u542f\u5e76\u6b63\u5728\u8fd0\u884c\u7684\u914d\u7f6e
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=\u5728\u57df %2$s \u4e0e\u590d\u5236\u670d\u52a1\u5668 %3$s \u7684\u521d\u59cb\u901a\u4fe1\uff08\u9636\u6bb5 %1$s\uff09\u8fc7\u7a0b\u4e2d\u6355\u83b7\u5230\u5f02\u5e38: %4$s
@@ -244,3 +252,5 @@
NOTICE_ERR_WHILE_TRYING_TO_DECODE_RUV_IN_STATE_200=\u5c1d\u8bd5\u5c06 RUV \u8f6c\u6362\u4e3a\u540e\u7f00 %s \u7684\u72b6\u6001\u65f6\u53d1\u751f\u9519\u8bef
SEVERE_ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=\u7528\u76f8\u540c\u7684\u66f4\u6539\u53f7=%s \u6765\u5904\u7406\u4e24\u4e2a\u4e0d\u540c\u7684\u66f4\u6539\u3002\u4ee5\u524d\u7684 msg=<%s>\uff0c\u65b0\u7684 msg=<%s>
SEVERE_ERR_COULD_NOT_SOLVE_CONFLICT_202=\u5c1d\u8bd5\u89e3\u51b3\u4e0e DN %s \u7684\u51b2\u7a81\u65f6\u51fa\u73b0\u9519\u8bef\uff1a\u9519\u8bef %s
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/messages/messages/replication_zh_TW.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2008 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
#
#
# This file contains the primary Directory Server configuration.  It must not
@@ -148,9 +149,14 @@
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
NOTICE_SSL_SERVER_CON_ATTEMPT_ERROR_105=\u5f9e %s (%s) \u57f7\u884c\u7684 SSL \u9023\u7dda\u5617\u8a66\u5931\u6557: %s
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u9060\u7aef\u4f3a\u670d\u5668\u7684\u76e3\u8996\u8cc7\u6599\u56e0\u64f7\u53d6\u7a0b\u5e8f\u767c\u751f\u932f\u8aa4\u800c\u907a\u5931\u3002\u53ef\u80fd\u662f\u56e0\u70ba\u4f3a\u670d\u5668\u901f\u5ea6\u592a\u6162\uff0c\u800c\u7121\u6cd5\u900f\u904e\u5354\u5b9a\u63d0\u4f9b\u5176\u76e3\u8996\u8cc7\u6599
SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=Timed out waiting for monitor data \
 for the domain "%s" from replication server RS(%d)
#SEVERE_ERR_MISSING_REMOTE_MONITOR_DATA_106=\u9060\u7aef\u4f3a\u670d\u5668\u7684\u76e3\u8996\u8cc7\u6599\u56e0\u64f7\u53d6\u7a0b\u5e8f\u767c\u751f\u932f\u8aa4\u800c\u907a\u5931\u3002\u53ef\u80fd\u662f\u56e0\u70ba\u4f3a\u670d\u5668\u901f\u5ea6\u592a\u6162\uff0c\u800c\u7121\u6cd5\u900f\u904e\u5354\u5b9a\u63d0\u4f9b\u5176\u76e3\u8996\u8cc7\u6599
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_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u50b3\u9001\u8acb\u6c42\u4ee5\u53d6\u5f97\u9060\u7aef\u76e3\u8996\u8cc7\u6599\u6642\u767c\u751f\u7570\u5e38
SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
 request for domain "%s" to replication server RS(%d) due to the following \
 error: %s
#SEVERE_ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=\u50b3\u9001\u8acb\u6c42\u4ee5\u53d6\u5f97\u9060\u7aef\u76e3\u8996\u8cc7\u6599\u6642\u767c\u751f\u7570\u5e38
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
@@ -158,7 +164,9 @@
DEBUG_CHANGES_SENT_113=\u6240\u6709\u50b3\u9001\u81f3\u8907\u88fd\u4f3a\u670d\u5668\u7684\u907a\u6f0f\u8b8a\u66f4
SEVERE_ERR_PUBLISHING_FAKE_OPS_114=Caught exception publishing fake operations for domain %s : %s
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
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u5f9e\u4f3a\u670d\u5668 ID \u70ba %s \u7684\u4f3a\u670d\u5668\u6536\u5230\u90e8\u5206\u76e3\u8996\u8cc7\u6599\uff0c\u4f46\u56e0\u592a\u665a\u9001\u9054\u800c\u906d\u5230\u5ffd\u7565
INFO_IGNORING_REMOTE_MONITOR_DATA_116=Late monitor data received for domain "%s" \
 from replication server RS(%d), and will be ignored
#NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=\u5f9e\u4f3a\u670d\u5668 ID \u70ba %s \u7684\u4f3a\u670d\u5668\u6536\u5230\u90e8\u5206\u76e3\u8996\u8cc7\u6599\uff0c\u4f46\u56e0\u592a\u665a\u9001\u9054\u800c\u906d\u5230\u5ffd\u7565
NOTICE_SERVER_STATE_RECOVERY_117=\u7db2\u57df %s \u7684 ServerState \u56de\u5fa9\u5df2\u4f7f\u7528 changeNumber %s \u66f4\u65b0
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=\u7121\u6cd5\u91cd\u8a2d\u7db2\u57df %s \u7684\u7522\u751f ID\uff0c\u56e0\u70ba\u8a72\u7db2\u57df\u672a\u9023\u7dda\u5230\u8907\u88fd\u3002\u60a8\u61c9\u5728\u914d\u7f6e\u4e2d\u6aa2\u67e5\u8a72\u7db2\u57df\u662f\u5426\u5df2\u555f\u7528
SEVERE_ERR_EXCEPTION_STARTING_SESSION_PHASE_119=Caught Exception during initial communication (phase %s) on domain %s with replication server %s : %s
@@ -215,3 +223,5 @@
NOTICE_ERR_FULL_UPDATE_IMPORT_FRACTIONAL_REMOTE_IS_FRACTIONAL_170=The online full update for importing suffix %s data from remote directory server %s has been stopped due to fractional configuration inconsistency between destination and source server : imported data set has some fractional configuration but not destination server
NOTICE_ERR_FRACTIONAL_FORBIDDEN_OPERATION_171=The following operation has been forbidden in suffix %s due to inconsistency with the fractional replication configuration : %s
NOTICE_ERR_FRACTIONAL_FORBIDDEN_FULL_UPDATE_FRACTIONAL_172=The export of domain %s from server %s to all other servers of the topology is forbidden as the source server has some fractional configuration : only fractional servers in a replicated topology does not makes sense
NOTICE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
 received from replication server RS(%d)
opends/src/server/org/opends/server/replication/server/DataServerHandler.java
@@ -31,7 +31,6 @@
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.replication.common.StatusMachine.*;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import java.io.IOException;
import java.util.ArrayList;
@@ -301,52 +300,42 @@
        this.replicationServerDomain.getReplicationServer()
        .getMonitorInstanceName()));
    try
    MonitorData md = replicationServerDomain.getDomainMonitorData();
    // Oldest missing update
    Long approxFirstMissingDate = md.getApproxFirstMissingDate(serverId);
    if ((approxFirstMissingDate != null) && (approxFirstMissingDate > 0))
    {
      MonitorData md = replicationServerDomain.computeMonitorData(true);
      // Oldest missing update
      Long approxFirstMissingDate = md.getApproxFirstMissingDate(serverId);
      if ((approxFirstMissingDate != null) && (approxFirstMissingDate > 0))
      {
        Date date = new Date(approxFirstMissingDate);
        attributes.add(Attributes.create(
            "approx-older-change-not-synchronized", date.toString()));
        attributes.add(Attributes.create(
            "approx-older-change-not-synchronized-millis", String
            .valueOf(approxFirstMissingDate)));
      }
      // Missing changes
      long missingChanges = md.getMissingChanges(serverId);
      attributes.add(Attributes.create("missing-changes", String
          .valueOf(missingChanges)));
      // Replication delay
      long delay = md.getApproxDelay(serverId);
      attributes.add(Attributes.create("approximate-delay", String
          .valueOf(delay)));
      /* get the Server State */
      AttributeBuilder builder = new AttributeBuilder("server-state");
      ServerState state = md.getLDAPServerState(serverId);
      if (state != null)
      {
        for (String str : state.toStringSet())
        {
          builder.add(str);
        }
        attributes.add(builder.toAttribute());
      }
      Date date = new Date(approxFirstMissingDate);
      attributes.add(Attributes.create(
          "approx-older-change-not-synchronized", date.toString()));
      attributes.add(Attributes.create(
          "approx-older-change-not-synchronized-millis", String
          .valueOf(approxFirstMissingDate)));
    }
    catch (Exception e)
    // Missing changes
    long missingChanges = md.getMissingChanges(serverId);
    attributes.add(Attributes.create("missing-changes", String
        .valueOf(missingChanges)));
    // Replication delay
    long delay = md.getApproxDelay(serverId);
    attributes.add(Attributes.create("approximate-delay", String
        .valueOf(delay)));
    /* get the Server State */
    AttributeBuilder builder = new AttributeBuilder("server-state");
    ServerState state = md.getLDAPServerState(serverId);
    if (state != null)
    {
      Message message =
        ERR_ERROR_RETRIEVING_MONITOR_DATA.get(stackTraceToSingleLineString(e));
      // We failed retrieving the monitor data.
      attributes.add(Attributes.create("error", message.toString()));
      for (String str : state.toStringSet())
      {
        builder.add(str);
      }
      attributes.add(builder.toAttribute());
    }
    return attributes;
  }
@@ -494,8 +483,7 @@
       * to old connection. This must be done before taking the domain lock so
       * that the reader thread has a chance to stop the handler.
       */
      replicationServerDomain.
      waitDisconnection(inServerStartMsg.getServerId());
      replicationServerDomain.waitDisconnection(inServerStartMsg.getServerId());
      // lock with no timeout
      lockDomain(false);
opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java
@@ -23,12 +23,12 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 */
package org.opends.server.replication.server;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.debug.DebugLogger.getTracer;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import java.util.ArrayList;
import java.util.Date;
@@ -240,59 +240,48 @@
        replServerHandler.getMonitorInstanceName()));
    // Retrieves the topology counters
    MonitorData md;
    try
    MonitorData md = rsDomain.getDomainMonitorData();
    ServerState remoteState = md.getLDAPServerState(serverId);
    if (remoteState == null)
    {
      md = rsDomain.computeMonitorData(true);
      ServerState remoteState = md.getLDAPServerState(serverId);
      if (remoteState == null)
      {
        remoteState = new ServerState();
      }
      /* get the Server State */
      AttributeBuilder builder = new AttributeBuilder("server-state");
      for (String str : remoteState.toStringSet())
      {
        builder.add(str);
      }
      if (builder.size() == 0)
      {
        builder.add("unknown");
      }
      attributes.add(builder.toAttribute());
      // Oldest missing update
      Long approxFirstMissingDate=md.getApproxFirstMissingDate(serverId);
      if ((approxFirstMissingDate != null) && (approxFirstMissingDate>0))
      {
        Date date = new Date(approxFirstMissingDate);
        attributes.add(Attributes.create(
            "approx-older-change-not-synchronized", date.toString()));
        attributes.add(Attributes.create(
            "approx-older-change-not-synchronized-millis", String
                .valueOf(approxFirstMissingDate)));
      }
      // Missing changes
      long missingChanges = md.getMissingChanges(serverId);
      attributes.add(Attributes.create("missing-changes",
          String.valueOf(missingChanges)));
      // Replication delay
      long delay = md.getApproxDelay(serverId);
      attributes.add(Attributes.create("approximate-delay",
          String.valueOf(delay)));
      remoteState = new ServerState();
    }
    catch(Exception e)
    /* get the Server State */
    AttributeBuilder builder = new AttributeBuilder("server-state");
    for (String str : remoteState.toStringSet())
    {
      // TODO: improve the log
      // We failed retrieving the remote monitor data.
      attributes.add(Attributes.create("error",
        stackTraceToSingleLineString(e)));
      builder.add(str);
    }
    if (builder.size() == 0)
    {
      builder.add("unknown");
    }
    attributes.add(builder.toAttribute());
    // Oldest missing update
    Long approxFirstMissingDate=md.getApproxFirstMissingDate(serverId);
    if ((approxFirstMissingDate != null) && (approxFirstMissingDate>0))
    {
      Date date = new Date(approxFirstMissingDate);
      attributes.add(Attributes.create(
          "approx-older-change-not-synchronized", date.toString()));
      attributes.add(Attributes.create(
          "approx-older-change-not-synchronized-millis", String
          .valueOf(approxFirstMissingDate)));
    }
    // Missing changes
    long missingChanges = md.getMissingChanges(serverId);
    attributes.add(Attributes.create("missing-changes",
        String.valueOf(missingChanges)));
    // Replication delay
    long delay = md.getApproxDelay(serverId);
    attributes.add(Attributes.create("approximate-delay",
        String.valueOf(delay)));
    return attributes;
  }
}
opends/src/server/org/opends/server/replication/server/MessageHandler.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 */
package org.opends.server.replication.server;
@@ -240,18 +241,6 @@
   * Returns the Replication Server Domain to which belongs this handler.
   *
   * @param createIfNotExist    Creates the domain if it does not exist.
   *
   * @return The replication server domain.
   */
  public ReplicationServerDomain getDomain(boolean createIfNotExist)
  {
    return getDomain(createIfNotExist, false);
  }
  /**
   * Returns the Replication Server Domain to which belongs this handler.
   *
   * @param createIfNotExist    Creates the domain if it does not exist.
   * @param waitConnections     Waits for the Connections with other RS to
   *                            be established before returning.
   * @return The replication server domain.
opends/src/server/org/opends/server/replication/server/MonitoringPublisher.java
@@ -28,14 +28,8 @@
package org.opends.server.replication.server;
import java.io.IOException;
import java.util.NoSuchElementException;
import org.opends.messages.Category;
import org.opends.messages.Message;
import org.opends.messages.Severity;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.debug.DebugLogger.getTracer;
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import org.opends.server.api.DirectoryThread;
import org.opends.server.loggers.debug.DebugTracer;
@@ -97,67 +91,70 @@
  {
    if (debugEnabled())
    {
      TRACER.debugInfo("Monitoring publisher starting for dn " +
        replicationServerDomain.getBaseDn().toString());
      TRACER.debugInfo("Monitoring publisher starting for dn "
          + replicationServerDomain.getBaseDn().toString());
    }
    while (!shutdown)
    try
    {
      try
      while (!shutdown)
      {
        try
        synchronized (shutdownLock)
        {
          synchronized (shutdownLock)
          if (!shutdown)
          {
            if (!shutdown)
            {
              shutdownLock.wait(period);
            }
            shutdownLock.wait(period);
          }
        } catch (InterruptedException ex)
        {
          TRACER.debugInfo("Monitoring publisher for dn " +
              replicationServerDomain.getBaseDn().toString() + " in RS " +
              replicationServerDomain.getReplicationServer().getServerId() +
              " has been interrupted while sleeping.");
        }
        // Send global topology information to peer DSs
        MonitorMsg monitorMsg =
          replicationServerDomain.createGlobalTopologyMonitorMsg(0, 0, true);
        int localServerId =
            replicationServerDomain.getReplicationServer().getServerId();
        if (monitorMsg != null)
        MonitorData monitorData = replicationServerDomain
            .computeDomainMonitorData();
        MonitorMsg monitorMsg = replicationServerDomain
            .createGlobalTopologyMonitorMsg(0, 0, monitorData);
        int localServerId = replicationServerDomain
            .getReplicationServer().getServerId();
        for (ServerHandler serverHandler : replicationServerDomain
            .getConnectedDSs().values())
        {
          for (ServerHandler serverHandler :
            replicationServerDomain.getConnectedDSs().values())
          // Set the right sender and destination ids
          monitorMsg.setSenderID(localServerId);
          monitorMsg.setDestination(serverHandler.getServerId());
          try
          {
            // Set the right sender and destination ids
            monitorMsg.setSenderID(localServerId);
            monitorMsg.setDestination(serverHandler.getServerId());
            try
            {
              serverHandler.send(monitorMsg);
            } catch (IOException e)
            {
              // Server is disconnecting ? Forget it
            }
            serverHandler.send(monitorMsg);
          }
          catch (IOException e)
          {
            // Server is disconnecting ? Forget it
          }
        }
      } catch (NoSuchElementException e)
      {
        logError(Message.raw(Category.SYNC, Severity.SEVERE_ERROR,
            stackTraceToSingleLineString(e)));
      }
    }
    catch (InterruptedException e)
    {
      TRACER.debugInfo("Monitoring publisher for dn "
          + replicationServerDomain.getBaseDn().toString()
          + " in RS "
          + replicationServerDomain.getReplicationServer()
              .getServerId()
          + " has been interrupted while sleeping.");
    }
    done = true;
    TRACER.debugInfo("Monitoring publisher for dn " +
      replicationServerDomain.getBaseDn().toString() + " is terminated." +
      " This is in RS " +
      replicationServerDomain.getReplicationServer().getServerId());
    TRACER.debugInfo("Monitoring publisher for dn "
        + replicationServerDomain.getBaseDn().toString()
        + " is terminated."
        + " This is in RS "
        + replicationServerDomain.getReplicationServer()
            .getServerId());
  }
  /**
   * Stops the thread.
   */
opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -41,15 +41,7 @@
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.*;
import org.opends.messages.Category;
import org.opends.messages.Message;
@@ -70,7 +62,6 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.WorkflowImpl;
import org.opends.server.core.networkgroups.NetworkGroup;
import org.opends.server.loggers.LogLevel;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.replication.common.*;
import org.opends.server.replication.protocol.ProtocolSession;
@@ -100,7 +91,6 @@
import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement;
import com.sleepycat.je.DatabaseException;
import java.util.Collections;
/**
 * ReplicationServer Listener.
@@ -113,7 +103,7 @@
 * It is responsible for creating the replication server replicationServerDomain
 * and managing it
 */
public class ReplicationServer
public final class ReplicationServer
  implements ConfigurationChangeListener<ReplicationServerCfg>,
             BackupTaskListener, RestoreTaskListener, ImportTaskListener,
             ExportTaskListener
@@ -131,8 +121,8 @@
  /* This table is used to store the list of dn for which we are currently
   * handling servers.
   */
  private ConcurrentHashMap<String, ReplicationServerDomain> baseDNs =
          new ConcurrentHashMap<String, ReplicationServerDomain>();
  private final Map<String, ReplicationServerDomain> baseDNs =
          new HashMap<String, ReplicationServerDomain>();
  private String localURL = "null";
  private volatile boolean shutdown = false;
@@ -155,11 +145,6 @@
  // ID of the backend
  private static final String backendId = "replicationChanges";
  // At startup, the listen thread wait on this flag for the connect
  // thread to look for other servers in the topology.
  private boolean connectedInTopology = false;
  private final Object connectedInTopologyLock = new Object();
  /*
   * Assured mode properties
   */
@@ -180,10 +165,20 @@
  // The handler of the draft change numbers database, the database used to
  // store the relation between a draft change number ('seqnum') and the
  // associated cookie.
  //
  // Guarded by draftCNLock
  //
  private DraftCNDbHandler draftCNDbHandler;
  // The last value generated of the draft change number.
  //
  // Guarded by draftCNLock
  //
  private int lastGeneratedDraftCN = 0;
  // Used for protecting draft CN related state.
  private final Object draftCNLock = new Object();
  /**
   * The tracer object for the debug logger.
   */
@@ -191,13 +186,15 @@
  private static String externalChangeLogWorkflowID =
    "External Changelog Workflow ID";
  ECLWorkflowElement eclwe;
  WorkflowImpl externalChangeLogWorkflowImpl = null;
  private ECLWorkflowElement eclwe;
  private WorkflowImpl externalChangeLogWorkflowImpl = null;
  private static HashSet<Integer> localPorts = new HashSet<Integer>();
  // used to synchronize the domain creation with the connect thread.
  final private Object domainMonitor = new Object();
  // Monitors for synchronizing domain creation with the connect thread.
  private final Object domainTicketLock = new Object();
  private final Object connectThreadLock = new Object();
  private long domainTicket = 0L;
  // ServiceIDs excluded for ECL
  private  ArrayList<String> excludedServiceIDs = new ArrayList<String>();
@@ -314,22 +311,6 @@
  void runListen()
  {
    // wait for the connect thread to find other replication
    // servers in the topology before starting to accept connections
    // from the ldap servers.
    synchronized (connectedInTopologyLock)
    {
      if (connectedInTopology == false)
      {
        try
        {
          connectedInTopologyLock.wait(1000);
        } catch (InterruptedException e)
        {
        }
      }
    }
    while ((shutdown == false) && (stopListen  == false))
    {
      // Wait on the replicationServer port.
@@ -419,88 +400,91 @@
   */
  void runConnect()
  {
    while (shutdown == false)
    synchronized (connectThreadLock)
    {
      /*
       * periodically check that we are connected to all other
       * replication servers and if not establish the connection
       */
      for (ReplicationServerDomain replicationServerDomain: baseDNs.values())
      while (!shutdown)
      {
        Set<String> connectedReplServers =
                replicationServerDomain.getChangelogs();
        /*
         * check that all replication server in the config are in the connected
         * Set. If not create the connection
         * periodically check that we are connected to all other replication
         * servers and if not establish the connection
         */
        for (String serverURL : replicationServers)
        for (ReplicationServerDomain domain : getReplicationServerDomains())
        {
          int separator = serverURL.lastIndexOf(':');
          String port = serverURL.substring(separator + 1);
          String hostname = serverURL.substring(0, separator);
          Set<String> connectedReplServers = domain.getChangelogs();
          try
          /*
           * check that all replication server in the config are in the
           * connected Set. If not create the connection
           */
          for (String serverURL : replicationServers)
          {
            InetAddress inetAddress = InetAddress.getByName(hostname);
            String serverAddress = inetAddress.getHostAddress() + ":" + port;
            String alternServerAddress = null;
            if (hostname.equalsIgnoreCase("localhost"))
            int separator = serverURL.lastIndexOf(':');
            String port = serverURL.substring(separator + 1);
            String hostname = serverURL.substring(0, separator);
            try
            {
              // if "localhost" was used as the hostname in the configuration
              // also check is the connection is already opened with the
              // local address.
              alternServerAddress =
                InetAddress.getLocalHost().getHostAddress() + ":" + port;
            }
            if (inetAddress.equals(InetAddress.getLocalHost()))
            {
              // if the host address is the local one, also check
              // if the connection is already opened with the "localhost"
              // address
              alternServerAddress = "127.0.0.1" + ":" + port;
            }
              InetAddress inetAddress = InetAddress
                  .getByName(hostname);
              String serverAddress = inetAddress.getHostAddress()
                  + ":" + port;
              String alternServerAddress = null;
            if ((serverAddress.compareTo("127.0.0.1:" + replicationPort) != 0)
                && (serverAddress.compareTo(this.localURL) != 0)
                && (!connectedReplServers.contains(serverAddress)
                && ((alternServerAddress == null)
                    || !connectedReplServers.contains(alternServerAddress))))
              if (hostname.equalsIgnoreCase("localhost"))
              {
                // if "localhost" was used as the hostname in the configuration
                // also check is the connection is already opened with the
                // local address.
                alternServerAddress = InetAddress.getLocalHost()
                    .getHostAddress() + ":" + port;
              }
              if (inetAddress.equals(InetAddress.getLocalHost()))
              {
                // if the host address is the local one, also check
                // if the connection is already opened with the "localhost"
                // address
                alternServerAddress = "127.0.0.1" + ":" + port;
              }
              if ((serverAddress.compareTo("127.0.0.1:"
                  + replicationPort) != 0)
                  && (serverAddress.compareTo(this.localURL) != 0)
                  && (!connectedReplServers.contains(serverAddress)
                      && ((alternServerAddress == null) || !connectedReplServers
                      .contains(alternServerAddress))))
              {
                connect(serverURL, domain.getBaseDn());
              }
            }
            catch (IOException e)
            {
              this.connect(serverURL, replicationServerDomain.getBaseDn());
              Message message = ERR_COULD_NOT_SOLVE_HOSTNAME
                  .get(hostname);
              logError(message);
            }
          }
          catch (IOException e)
          {
            Message message = ERR_COULD_NOT_SOLVE_HOSTNAME.get(hostname);
            logError(message);
          }
        }
      }
      synchronized (connectedInTopologyLock)
      {
        // wake up the listen thread if necessary.
        if (connectedInTopology == false)
        // Notify any threads waiting with domain tickets after each iteration.
        synchronized (domainTicketLock)
        {
          connectedInTopologyLock.notify();
          connectedInTopology = true;
          domainTicket++;
          domainTicketLock.notifyAll();
        }
      }
      try
      {
        synchronized(domainMonitor)
        // Retry each second.
        final int randomizer = (int) (Math.random() * 100);
        try
        {
          domainMonitor.notifyAll();
          // Releases lock, allows threads to get domain ticket.
          connectThreadLock.wait(1000 + randomizer);
        }
        synchronized (this)
        catch (InterruptedException e)
        {
          /* check if we are connected every second */
          int randomizer = (int)(Math.random()*100);
          wait(1000 + randomizer);
          // Signalled to shutdown.
          return;
        }
      } catch (InterruptedException e)
      {
        // ignore error, will try to connect again or shutdown
      }
    }
  }
@@ -721,40 +705,50 @@
  private void shutdownECL()
  {
    WorkflowImpl eclwf =
      (WorkflowImpl)WorkflowImpl.getWorkflow(externalChangeLogWorkflowID);
    WorkflowImpl eclwf = (WorkflowImpl) WorkflowImpl
        .getWorkflow(externalChangeLogWorkflowID);
    // do it only if not already done by another RS (unit test case)
    // if (DirectoryServer.getWorkflowElement(externalChangeLogWorkflowID)
    if (eclwf!=null)
    if (eclwf != null)
    {
      // FIXME:ECL should the ECL Workflow be registered in
      // internalNetworkGroup?
      NetworkGroup internalNetworkGroup = NetworkGroup
          .getInternalNetworkGroup();
      internalNetworkGroup
          .deregisterWorkflow(externalChangeLogWorkflowID);
      // FIXME:ECL should the ECL Workflow be registered in adminNetworkGroup?
      NetworkGroup adminNetworkGroup = NetworkGroup
          .getAdminNetworkGroup();
      adminNetworkGroup
          .deregisterWorkflow(externalChangeLogWorkflowID);
    // FIXME:ECL should the ECL Workflow be registered in internalNetworkGroup?
    NetworkGroup internalNetworkGroup = NetworkGroup.getInternalNetworkGroup();
    internalNetworkGroup.deregisterWorkflow(externalChangeLogWorkflowID);
      NetworkGroup defaultNetworkGroup = NetworkGroup
          .getDefaultNetworkGroup();
      defaultNetworkGroup
          .deregisterWorkflow(externalChangeLogWorkflowID);
    // FIXME:ECL should the ECL Workflow be registered in adminNetworkGroup?
    NetworkGroup adminNetworkGroup = NetworkGroup.getAdminNetworkGroup();
    adminNetworkGroup.deregisterWorkflow(externalChangeLogWorkflowID);
    NetworkGroup defaultNetworkGroup = NetworkGroup.getDefaultNetworkGroup();
    defaultNetworkGroup.deregisterWorkflow(externalChangeLogWorkflowID);
    eclwf.deregister();
    eclwf.finalizeWorkflow();
      eclwf.deregister();
      eclwf.finalizeWorkflow();
    }
    eclwe = (ECLWorkflowElement)
    DirectoryServer.getWorkflowElement("EXTERNAL CHANGE LOG");
    if (eclwe!=null)
    eclwe = (ECLWorkflowElement) DirectoryServer
        .getWorkflowElement("EXTERNAL CHANGE LOG");
    if (eclwe != null)
    {
      DirectoryServer.deregisterWorkflowElement(eclwe);
      eclwe.finalizeWorkflowElement();
    }
    if (draftCNDbHandler != null)
      draftCNDbHandler.shutdown();
    synchronized (draftCNLock)
    {
      if (draftCNDbHandler != null)
      {
        draftCNDbHandler.shutdown();
      }
    }
  }
  /**
@@ -790,38 +784,60 @@
  public ReplicationServerDomain getReplicationServerDomain(String baseDn,
          boolean create, boolean waitConnections)
  {
    ReplicationServerDomain replicationServerDomain;
    ReplicationServerDomain domain;
    synchronized (baseDNs)
    {
      replicationServerDomain = baseDNs.get(baseDn);
      if ((replicationServerDomain == null) && (create))
      domain = baseDNs.get(baseDn);
      if (domain != null ||!create) {
        return domain;
      }
      domain = new ReplicationServerDomain(baseDn, this);
      baseDNs.put(baseDn, domain);
    }
    if (waitConnections)
    {
      // Acquire a domain ticket and wait for a complete cycle of the connect
      // thread.
      final long myDomainTicket;
      synchronized (connectThreadLock)
      {
        replicationServerDomain = new ReplicationServerDomain(baseDn, this);
        baseDNs.put(baseDn, replicationServerDomain);
        synchronized (domainMonitor)
        // Connect thread must be waiting.
        synchronized (domainTicketLock)
        {
          if (waitConnections)
          // Determine the ticket which will be used in the next connect thread
          // iteration.
          myDomainTicket = domainTicket + 1;
        }
        // Wake up connect thread.
        connectThreadLock.notify();
      }
      // Wait until the connect thread has processed next connect phase.
      synchronized (domainTicketLock)
      {
        // Condition.
        while (myDomainTicket > domainTicket && !shutdown)
        {
          try
          {
            synchronized (this)
            {
              // kick up the connect thread so that this new domain
              // gets connected to all the Replication Servers.
              this.notify();
            }
            try
            {
              // wait for the connect thread to signal that it finished its job
              domainMonitor.wait(500);
            } catch (InterruptedException e)
            {
            }
            // Wait with timeout so that we detect shutdown.
            domainTicketLock.wait(500);
          }
          catch (InterruptedException e)
          {
            // Can't do anything with this.
            Thread.currentThread().interrupt();
          }
        }
      }
    }
    return replicationServerDomain;
    return domain;
  }
  /**
@@ -861,9 +877,9 @@
    }
    // shutdown all the ChangelogCaches
    for (ReplicationServerDomain replicationServerDomain : baseDNs.values())
    for (ReplicationServerDomain domain : getReplicationServerDomains())
    {
      replicationServerDomain.shutdown();
      domain.shutdown();
    }
    shutdownECL();
@@ -894,37 +910,60 @@
    return new DbHandler(id, baseDn, this, dbEnv, queueSize);
  }
  /**
   * Clears the generationId for the replicationServerDomain related to the
   * provided baseDn.
   * @param  baseDn The baseDn for which to delete the generationId.
   * @throws DatabaseException When it occurs.
   *
   * @param baseDn
   *          The baseDn for which to delete the generationId.
   */
  public void clearGenerationId(String baseDn)
  throws DatabaseException
  {
    try
    {
      dbEnv.clearGenerationId(baseDn);
    }
    catch (Exception e)
    {
      // Ignore.
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.WARNING, e);
      }
    }
      if (this.draftCNDbHandler != null)
    synchronized (draftCNLock)
    {
      if (draftCNDbHandler != null)
      {
        try
        {
          try
          draftCNDbHandler.clear(baseDn);
        }
        catch (Exception e)
        {
          // Ignore.
          if (debugEnabled())
          {
            draftCNDbHandler.clear(baseDn);
            TRACER.debugCaught(DebugLogLevel.WARNING, e);
          }
          catch(Exception e){}
        }
        try
        {
          lastGeneratedDraftCN = draftCNDbHandler.getLastKey();
        }
        catch(Exception e) {}
        catch (Exception e)
        {
          // Ignore.
          if (debugEnabled())
          {
            TRACER.debugCaught(DebugLogLevel.WARNING, e);
          }
        }
      }
    }
    catch(Exception e)
    {
      TRACER.debugCaught(LogLevel.ALL, e);
    }
  }
@@ -993,7 +1032,7 @@
    {
      purgeDelay = newPurgeDelay;
      // propagate
      for (ReplicationServerDomain domain : baseDNs.values())
      for (ReplicationServerDomain domain : getReplicationServerDomains())
      {
        domain.setPurgeDelay(purgeDelay*1000);
      }
@@ -1043,64 +1082,71 @@
    // Update threshold value for status analyzers (stop them if requested
    // value is 0)
    if (degradedStatusThreshold != configuration.getDegradedStatusThreshold())
    if (degradedStatusThreshold != configuration
        .getDegradedStatusThreshold())
    {
      int oldThresholdValue = degradedStatusThreshold;
      degradedStatusThreshold = configuration.getDegradedStatusThreshold();
      for(ReplicationServerDomain rsd : baseDNs.values())
      degradedStatusThreshold = configuration
          .getDegradedStatusThreshold();
      for (ReplicationServerDomain domain : getReplicationServerDomains())
      {
        if (degradedStatusThreshold == 0)
        {
          // Requested to stop analyzers
          rsd.stopStatusAnalyzer();
        } else if (rsd.isRunningStatusAnalyzer())
          domain.stopStatusAnalyzer();
        }
        else if (domain.isRunningStatusAnalyzer())
        {
          // Update the threshold value for this running analyzer
          rsd.updateStatusAnalyzer(degradedStatusThreshold);
        } else if (oldThresholdValue == 0)
          domain.updateStatusAnalyzer(degradedStatusThreshold);
        }
        else if (oldThresholdValue == 0)
        {
          // Requested to start analyzers with provided threshold value
          if (rsd.getConnectedDSs().size() > 0)
            rsd.startStatusAnalyzer();
          if (domain.getConnectedDSs().size() > 0)
            domain.startStatusAnalyzer();
        }
      }
    }
    // Update period value for monitoring publishers (stop them if requested
    // value is 0)
    if (monitoringPublisherPeriod != configuration.getMonitoringPeriod())
    if (monitoringPublisherPeriod != configuration
        .getMonitoringPeriod())
    {
      long oldMonitoringPeriod = monitoringPublisherPeriod;
      monitoringPublisherPeriod = configuration.getMonitoringPeriod();
      for(ReplicationServerDomain rsd : baseDNs.values())
      for (ReplicationServerDomain domain : getReplicationServerDomains())
      {
        if (monitoringPublisherPeriod == 0L)
        {
          // Requested to stop monitoring publishers
          rsd.stopMonitoringPublisher();
        } else if (rsd.isRunningMonitoringPublisher())
          domain.stopMonitoringPublisher();
        }
        else if (domain.isRunningMonitoringPublisher())
        {
          // Update the threshold value for this running monitoring publisher
          rsd.updateMonitoringPublisher(monitoringPublisherPeriod);
        } else if (oldMonitoringPeriod == 0L)
          domain.updateMonitoringPublisher(monitoringPublisherPeriod);
        }
        else if (oldMonitoringPeriod == 0L)
        {
          // Requested to start monitoring publishers with provided period value
          if ( (rsd.getConnectedDSs().size() > 0) ||
            (rsd.getConnectedRSs().size() > 0) )
            rsd.startMonitoringPublisher();
          if ((domain.getConnectedDSs().size() > 0)
              || (domain.getConnectedRSs().size() > 0))
            domain.startMonitoringPublisher();
        }
      }
    }
    // Changed the group id ?
    byte newGroupId = (byte)configuration.getGroupId();
    byte newGroupId = (byte) configuration.getGroupId();
    if (newGroupId != groupId)
    {
      groupId = newGroupId;
      // Have a new group id: Disconnect every servers.
      for (ReplicationServerDomain replicationServerDomain : baseDNs.values())
      for (ReplicationServerDomain domain : getReplicationServerDomains())
      {
        replicationServerDomain.stopAllServers(true);
        domain.stopAllServers(true);
      }
    }
@@ -1129,10 +1175,10 @@
   */
  private void broadcastConfigChange()
  {
    for (ReplicationServerDomain replicationServerDomain : baseDNs.values())
    for (ReplicationServerDomain domain : getReplicationServerDomains())
    {
      replicationServerDomain.buildAndSendTopoInfoToDSs(null);
      replicationServerDomain.buildAndSendTopoInfoToRSs();
      domain.buildAndSendTopoInfoToDSs(null);
      domain.buildAndSendTopoInfoToRSs();
    }
  }
@@ -1364,10 +1410,15 @@
   */
  public Iterator<ReplicationServerDomain> getDomainIterator()
  {
    if (!baseDNs.isEmpty())
      return baseDNs.values().iterator();
    Collection<ReplicationServerDomain> domains = getReplicationServerDomains();
    if (!domains.isEmpty())
    {
      return domains.iterator();
    }
    else
    {
      return null;
    }
  }
  /**
@@ -1384,16 +1435,40 @@
        rsd.clearDbs();
      }
    }
    if (this.draftCNDbHandler != null)
    synchronized (draftCNLock)
    {
      try
      if (draftCNDbHandler != null)
      {
        try { draftCNDbHandler.clear(); } catch(Exception e){}
        draftCNDbHandler.shutdown();
        try
        {
          draftCNDbHandler.clear();
        }
        catch (Exception e)
        {
          // Ignore.
          if (debugEnabled())
          {
            TRACER.debugCaught(DebugLogLevel.WARNING, e);
          }
        }
        try
        {
          draftCNDbHandler.shutdown();
        }
        catch (Exception e)
        {
          // Ignore.
          if (debugEnabled())
          {
            TRACER.debugCaught(DebugLogLevel.WARNING, e);
          }
        }
        lastGeneratedDraftCN = 0;
        draftCNDbHandler = null;
      }
      catch(Exception e) {}
    }
  }
@@ -1468,9 +1543,9 @@
    if (serversToDisconnect.isEmpty())
      return;
    for (ReplicationServerDomain replicationServerDomain: baseDNs.values())
    for (ReplicationServerDomain domain: getReplicationServerDomains())
    {
      replicationServerDomain.stopReplicationServers(serversToDisconnect);
      domain.stopReplicationServers(serversToDisconnect);
    }
  }
@@ -1494,221 +1569,6 @@
    return replicationPort;
  }
  // TODO: Remote monitor data cache lifetime is 500ms/should be configurable
  private long monitorDataLifeTime = 500;
  /* The date of the last time they have been elaborated */
  private long monitorDataLastBuildDate = 0;
  /**
   * This uniquely identifies a server (handler) in the cross-domain topology.
   * Represents an identifier of a handler (in the whole RS) we have to wait a
   * monitoring message from before answering to a monitor request.
   */
  public static class GlobalServerId {
    private int serverId = -1;
    private String baseDn = null;
    /**
     * Constructor for a global server id.
     * @param baseDn The dn of the RSD owning the handler.
     * @param serverId The handler id in the matching RSD.
     */
    public GlobalServerId(String baseDn, int serverId) {
      this.baseDn = baseDn;
      this.serverId = serverId;
    }
    /**
     * Get the server handler id.
     * @return the serverId
     */
    public int getServerId()
    {
      return serverId;
    }
    /**
     * Get the base dn.
     * @return the baseDn
     */
    public String getBaseDn()
    {
      return baseDn;
    }
    /**
     * Get the hascode.
     * @return The hashcode.
     */
    @Override
    public int hashCode()
    {
      int hash = 7;
      hash = 43 * hash + this.serverId;
      hash = 43 * hash + (this.baseDn != null ? this.baseDn.hashCode() : 0);
      return hash;
    }
    /**
     * Tests if the passed global server handler id represents the same server
     * handler as this one.
     * @param obj The object to test.
     * @return True if both identifiers are the same.
     */
    public boolean equals(Object obj) {
      if ( (obj == null) || (!(obj instanceof GlobalServerId)))
        return false;
      GlobalServerId globalServerId = (GlobalServerId)obj;
      return ( globalServerId.baseDn.equals(baseDn) &&
        (globalServerId.serverId == serverId) );
    }
  }
  /**
   * This gives the list of server handlers we are willing to wait monitoring
   * message from. Each time a monitoring message is received by a server
   * handler, the matching server handler id is retired from the list. When the
   * list is empty, we received all expected monitoring messages.
   */
  private List<GlobalServerId> expectedMonitoringMsg = null;
  /**
   * Trigger the computation of the Global Monitoring Data.
   * This should be called by all the MonitorProviders that need
   * the global monitoring data to be updated before they can
   * publish their information to cn=monitor.
   *
   * This method will trigger the update of all the global monitoring
   * information of all the base-DNs of this replication Server.
   *
   * @throws DirectoryException If the computation cannot be achieved.
   */
  public synchronized void computeMonitorData() throws DirectoryException
  {
    if (monitorDataLastBuildDate + monitorDataLifeTime > TimeThread.getTime())
    {
      if (debugEnabled())
        TRACER.debugInfo(
          "In " + getMonitorInstanceName() + " getRemoteMonitorData in cache");
      // The current data are still valid. No need to renew them.
      return;
    }
    // Initialize the list of server handlers we expect monitoring messages from
    expectedMonitoringMsg =
      Collections.synchronizedList(new ArrayList<GlobalServerId>());
    // Copy the list of domains as a new domain may arrive or disappear between
    // the initializeMonitorData and completeMonitorData calls
    List<ReplicationServerDomain> rsdList =
                new ArrayList<ReplicationServerDomain>(baseDNs.values());
    for (ReplicationServerDomain domain : rsdList)
    {
      domain.initializeMonitorData(expectedMonitoringMsg);
    }
    // Wait for responses
    waitMonitorDataResponses();
    for (ReplicationServerDomain domain : rsdList)
    {
      domain.completeMonitorData();
    }
  }
  /**
   * Wait for the expected received MonitorMsg.
   * @throws DirectoryException When an error occurs.
   */
  private void waitMonitorDataResponses()
    throws DirectoryException
  {
    try
    {
      if (debugEnabled())
        TRACER.debugInfo(
          "In " + getMonitorInstanceName() +
          " waiting for " + expectedMonitoringMsg.size() +
          " expected monitor messages");
      // Wait up to 5 seconds for every expected monitoring message to come
      // back.
      boolean allReceived = false;
      long startTime = TimeThread.getTime();
      long curTime = startTime;
      int maxTime = 5000;
      while ( (curTime - startTime) < maxTime )
      {
        // Have every expected monitoring messages arrived ?
        if (expectedMonitoringMsg.size() == 0)
        {
          // Ok break the loop
          allReceived = true;
          break;
        }
        Thread.sleep(100);
        curTime = TimeThread.getTime();
      }
      monitorDataLastBuildDate = TimeThread.getTime();
      if (!allReceived)
      {
        logError(ERR_MISSING_REMOTE_MONITOR_DATA.get());
        // let's go on in best effort even with limited data received.
      } else
      {
        if (debugEnabled())
          TRACER.debugInfo(
            "In " + getMonitorInstanceName() +
            " Successfully received all expected monitor messages");
      }
    } catch (Exception e)
    {
      logError(ERR_PROCESSING_REMOTE_MONITOR_DATA.get(e.getMessage()));
    }
  }
  /**
   * This should be called by each ReplicationServerDomain that receives
   * a response to a monitor request message. This may also be called when a
   * monitoring message is coming from a RS whose monitoring publisher thread
   * sent it. As monitoring messages (sent because of monitoring request or
   * because of monitoring publisher) have the same content, this is also ok
   * to mark ok the server when the monitoring message coms from a monitoring
   * publisher thread.
   * @param globalServerId The server handler that is receiving the
   * monitoring message.
   */
  public void responseReceived(GlobalServerId globalServerId)
  {
    expectedMonitoringMsg.remove(globalServerId);
  }
  /**
   * This should be called when the Monitoring has failed and the
   * Worker thread that is waiting for the result should be awaken.
   */
  public void responseReceivedAll()
  {
    expectedMonitoringMsg.clear();
  }
  /**
   * Returns the number of domains managed by this replication server.
   * @return the number of domains managed.
   */
  public int getCacheSize()
  {
    return baseDNs.size();
  }
  /**
   * Create a new session to get the ECL.
   * @param msg The message that specifies the ECL request.
@@ -1861,32 +1721,37 @@
    return eligibleCN;
  }
  /**
   * Get or create a handler on a Db on DraftCN for external changelog.
   *
   * @return the handler.
   * @throws DirectoryException when needed.
   * @throws DirectoryException
   *           when needed.
   */
  public synchronized DraftCNDbHandler getDraftCNDbHandler()
  throws DirectoryException
  public DraftCNDbHandler getDraftCNDbHandler()
      throws DirectoryException
  {
    try
    synchronized (draftCNLock)
    {
      if (draftCNDbHandler == null)
      try
      {
        draftCNDbHandler = new DraftCNDbHandler(this, this.dbEnv);
        if (draftCNDbHandler == null)
          return null;
        this.lastGeneratedDraftCN = getLastDraftChangeNumber();
        {
          draftCNDbHandler = new DraftCNDbHandler(this, this.dbEnv);
          lastGeneratedDraftCN = getLastDraftChangeNumber();
        }
        return draftCNDbHandler;
      }
      return draftCNDbHandler;
    }
    catch (Exception e)
    {
      TRACER.debugCaught(DebugLogLevel.ERROR, e);
      MessageBuilder mb = new MessageBuilder();
      mb.append(ERR_DRAFT_CHANGENUMBER_DATABASE.get(""));
      throw new DirectoryException(ResultCode.OPERATIONS_ERROR,
          mb.toMessage(), e);
      catch (Exception e)
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
        MessageBuilder mb = new MessageBuilder();
        mb.append(ERR_DRAFT_CHANGENUMBER_DATABASE.get(""));
        throw new DirectoryException(ResultCode.OPERATIONS_ERROR,
            mb.toMessage(), e);
      }
    }
  }
@@ -1896,10 +1761,17 @@
   */
  public int getFirstDraftChangeNumber()
  {
    int first=0;
    if (draftCNDbHandler != null)
      first = draftCNDbHandler.getFirstKey();
    return first;
    synchronized (draftCNLock)
    {
      if (draftCNDbHandler != null)
      {
        return draftCNDbHandler.getFirstKey();
      }
      else
      {
        return 0;
      }
    }
  }
  /**
@@ -1908,19 +1780,29 @@
   */
  public int getLastDraftChangeNumber()
  {
    int last=0;
    if (draftCNDbHandler != null)
      last = draftCNDbHandler.getLastKey();
    return last;
    synchronized (draftCNLock)
    {
      if (draftCNDbHandler != null)
      {
        return draftCNDbHandler.getLastKey();
      }
      else
      {
        return 0;
      }
    }
  }
  /**
   * Generate a new Draft ChangeNumber.
   * @return The generated Draft ChangeNUmber
   */
  synchronized public int getNewDraftCN()
  public int getNewDraftCN()
  {
    return ++lastGeneratedDraftCN;
    synchronized (draftCNLock)
    {
      return ++lastGeneratedDraftCN;
    }
  }
  /**
@@ -2092,4 +1974,14 @@
    return weight;
  }
  private Collection<ReplicationServerDomain> getReplicationServerDomains()
  {
    synchronized (baseDNs)
    {
      return new ArrayList<ReplicationServerDomain>(baseDNs.values());
    }
  }
}
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -35,17 +35,10 @@
import java.io.IOException;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
@@ -57,39 +50,12 @@
import org.opends.server.api.MonitorProvider;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.replication.common.AssuredMode;
import org.opends.server.replication.common.ChangeNumber;
import org.opends.server.replication.common.DSInfo;
import org.opends.server.replication.common.RSInfo;
import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.common.ServerStatus;
import org.opends.server.replication.common.StatusMachineEvent;
import org.opends.server.replication.protocol.AckMsg;
import org.opends.server.replication.protocol.ChangeStatusMsg;
import org.opends.server.replication.protocol.ChangeTimeHeartbeatMsg;
import org.opends.server.replication.protocol.DoneMsg;
import org.opends.server.replication.protocol.EntryMsg;
import org.opends.server.replication.protocol.ErrorMsg;
import org.opends.server.replication.protocol.InitializeRequestMsg;
import org.opends.server.replication.protocol.InitializeTargetMsg;
import org.opends.server.replication.protocol.InitializeRcvAckMsg;
import org.opends.server.replication.protocol.MonitorMsg;
import org.opends.server.replication.protocol.MonitorRequestMsg;
import org.opends.server.replication.protocol.ProtocolVersion;
import org.opends.server.replication.protocol.ResetGenerationIdMsg;
import org.opends.server.replication.protocol.RoutableMsg;
import org.opends.server.replication.protocol.TopologyMsg;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeBuilder;
import org.opends.server.types.Attributes;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.ResultCode;
import org.opends.server.replication.common.*;
import org.opends.server.replication.protocol.*;
import org.opends.server.types.*;
import org.opends.server.util.TimeThread;
import com.sleepycat.je.DatabaseException;
import org.opends.server.replication.server.
  ReplicationServer.GlobalServerId;
/**
 * This class define an in-memory cache that will be used to store
@@ -165,9 +131,47 @@
  /**
   * The monitor data consolidated over the topology.
   */
  private MonitorData monitorData = new MonitorData();
  private MonitorData wrkMonitorData;
  private final Object monitorDataLock = new Object();
  private volatile MonitorData monitorData = new MonitorData();
  // This lock guards against multiple concurrent monitor data recalculation.
  private final Object pendingMonitorLock = new Object();
  // Guarded by pendingMonitorLock.
  private long monitorDataLastBuildDate = 0;
  // The set of replication servers which are already known to be slow to send
  // monitor data.
  //
  // Guarded by pendingMonitorLock.
  private Set<Integer> monitorDataLateServers = new HashSet<Integer>();
  // This lock serializes updates to the pending monitor data.
  private final Object pendingMonitorDataLock = new Object();
  // Monitor data which is currently being calculated.
  //
  // Guarded by pendingMonitorDataLock.
  private MonitorData pendingMonitorData;
  // A set containing the IDs of servers from which we are currently expecting
  // monitor responses. When a response is received from a server we remove the
  // ID from this table, and count down the latch if the ID was in the table.
  //
  // Guarded by pendingMonitorDataLock.
  private final Set<Integer> pendingMonitorDataServerIDs =
    new HashSet<Integer>();
  // This latch is non-null and is used in order to count incoming responses as
  // they arrive. Since incoming response may arrive at any time, even when
  // there is no pending monitor request, access to the latch must be guarded.
  //
  // Guarded by pendingMonitorDataLock.
  private CountDownLatch pendingMonitorDataLatch = null;
  // TODO: Remote monitor data cache lifetime is 500ms/should be configurable
  private final long monitorDataLifeTime = 500;
  /**
   * The needed info for each received assured update message we are waiting
@@ -188,7 +192,7 @@
  // every n number of treated assured messages
  private int assuredTimeoutTimerPurgeCounter = 0;
  ServerState ctHeartbeatState = null;
  private ServerState ctHeartbeatState = null;
  /**
   * Creates a new ReplicationServerDomain associated to the DN baseDn.
@@ -1207,7 +1211,7 @@
   * domain.
   * @param handler the provided handler to unregister.
   */
  protected void unregisterServerHandler(ServerHandler handler)
  private void unregisterServerHandler(ServerHandler handler)
  {
    if (handler.isReplicationServer())
    {
@@ -1228,7 +1232,7 @@
   * - traverse replicationServers list and test for each if DS are connected
   * So it strongly relies on the directoryServers list
   */
  protected void mayResetGenerationId()
  private void mayResetGenerationId()
  {
    if (debugEnabled())
      TRACER.debugInfo(
@@ -1523,7 +1527,7 @@
   * @param senderHandler The handler of the server that published this message.
   * @return The list of destination handlers.
   */
  protected List<ServerHandler> getDestinationServers(RoutableMsg msg,
  private List<ServerHandler> getDestinationServers(RoutableMsg msg,
    ServerHandler senderHandler)
  {
    List<ServerHandler> servers =
@@ -1618,16 +1622,16 @@
        if (senderHandler.isDataServer())
        {
          // Monitoring information requested by a DS
          MonitorMsg monitorMsg =
            createGlobalTopologyMonitorMsg(
                msg.getDestination(), msg.getSenderID(), false);
          MonitorMsg monitorMsg = createGlobalTopologyMonitorMsg(
              msg.getDestination(), msg.getSenderID(), monitorData);
           if (monitorMsg != null)
          if (monitorMsg != null)
          {
            try
            {
              senderHandler.send(monitorMsg);
            } catch (IOException e)
            }
            catch (IOException e)
            {
              // the connection was closed.
            }
@@ -1656,12 +1660,8 @@
        }
      } else if (msg instanceof MonitorMsg)
      {
        MonitorMsg monitorMsg =
          (MonitorMsg) msg;
        GlobalServerId globalServerId =
          new GlobalServerId(baseDn, senderHandler.getServerId());
        receivesMonitorDataResponse(monitorMsg, globalServerId);
        MonitorMsg monitorMsg = (MonitorMsg) msg;
        receivesMonitorDataResponse(monitorMsg, senderHandler.getServerId());
      } else
      {
        logError(NOTE_ERR_ROUTING_TO_SERVER.get(
@@ -1758,61 +1758,51 @@
  }
  /**
   * Creates a new monitor message including monitoring information for the
   * whole topology.
   * @param sender The sender of this message.
   * @param destination The destination of this message.
   * @param  updateMonitorData A boolean indicating if the monitor data should
   *                           be updated. If false the last monitoring data
   *                           that was computed will be returned. This is
   *                           acceptable for most cases because the monitoring
   *                           thread computes the monitoring data frequently.
   *                           If true is used the calling thread may be
   *                           blocked for a while.
   *
   * @param sender
   *          The sender of this message.
   * @param destination
   *          The destination of this message.
   * @param monitorData
   *          The domain monitor data which should be used for the message.
   * @return The newly created and filled MonitorMsg. Null if a problem occurred
   * during message creation.
   *         during message creation.
   */
  public MonitorMsg createGlobalTopologyMonitorMsg(
      int sender, int destination, boolean updateMonitorData)
      int sender, int destination, MonitorData monitorData)
  {
    MonitorMsg returnMsg =
      new MonitorMsg(sender, destination);
    try
    {
      returnMsg.setReplServerDbState(getDbServerState());
      // Update the information we have about all servers
      // in the topology.
      MonitorData md = computeMonitorData(updateMonitorData);
    returnMsg.setReplServerDbState(getDbServerState());
      // Add the informations about the Replicas currently in
      // the topology.
      Iterator<Integer> it = md.ldapIterator();
      while (it.hasNext())
      {
        int replicaId = it.next();
        returnMsg.setServerState(
            replicaId, md.getLDAPServerState(replicaId),
            md.getApproxFirstMissingDate(replicaId), true);
      }
      // Add the informations about the Replication Servers
      // currently in the topology.
      it = md.rsIterator();
      while (it.hasNext())
      {
        int replicaId = it.next();
        returnMsg.setServerState(
            replicaId, md.getRSStates(replicaId),
            md.getRSApproxFirstMissingDate(replicaId), false);
      }
    }
    catch (DirectoryException e)
    // Add the informations about the Replicas currently in
    // the topology.
    Iterator<Integer> it = monitorData.ldapIterator();
    while (it.hasNext())
    {
      // If we can't compute the Monitor Information, send
      // back an empty message.
      int replicaId = it.next();
      returnMsg.setServerState(replicaId,
          monitorData.getLDAPServerState(replicaId),
          monitorData.getApproxFirstMissingDate(replicaId), true);
    }
    // Add the informations about the Replication Servers
    // currently in the topology.
    it = monitorData.rsIterator();
    while (it.hasNext())
    {
      int replicaId = it.next();
      returnMsg.setServerState(replicaId,
          monitorData.getRSStates(replicaId),
          monitorData.getRSApproxFirstMissingDate(replicaId), false);
    }
    return returnMsg;
  }
@@ -2559,192 +2549,233 @@
   * Monitor Data generation
   * =======================
   */
  /**
   * Retrieves the global monitor data.
   * @param  updateMonitorData A boolean indicating if the monitor data should
   *                           be updated. If false the last monitoring data
   *                           that was computed will be returned. This is
   *                           acceptable for most cases because the monitoring
   *                           thread computes the monitoring data frequently.
   *                           If true is used the calling thread may be
   *                           blocked for a while.
   * @return The monitor data.
   * @throws DirectoryException When an error occurs.
   */
  protected MonitorData computeMonitorData(boolean updateMonitorData)
    throws DirectoryException
  {
    synchronized (monitoringLock)
    {
      if (updateMonitorData)
      {
        // Update the monitorData of ALL domains if this was necessary.
        replicationServer.computeMonitorData();
      }
      // Returns the monitorData of THIS domain
      return monitorData;
    }
  /**
   * Returns the latest monitor data available for this replication server
   * domain.
   *
   * @return The latest monitor data available for this replication server
   *         domain, which is never {@code null}.
   */
  MonitorData getDomainMonitorData()
  {
    return monitorData;
  }
  /**
   * Recomputes the monitor data for this replication server domain.
   *
   * @return The recomputed monitor data for this replication server domain.
   * @throws InterruptedException
   *           If this thread is interrupted while waiting for a response.
   */
  MonitorData computeDomainMonitorData() throws InterruptedException
  {
    // Only allow monitor recalculation at a time.
    synchronized (pendingMonitorLock)
    {
      if ((monitorDataLastBuildDate + monitorDataLifeTime) < TimeThread
          .getTime())
      {
        try
        {
          // Prevent out of band monitor responses from updating our pending
          // table until we are ready.
          synchronized (pendingMonitorDataLock)
          {
            // Clear the pending monitor data.
            pendingMonitorDataServerIDs.clear();
            pendingMonitorData = new MonitorData();
            // Initialize the monitor data.
            initializePendingMonitorData();
            // Send the monitor requests to the connected replication servers.
            for (ReplicationServerHandler rs : replicationServers.values())
            {
              // Add server ID to pending table.
              int serverId = rs.getServerId();
              MonitorRequestMsg msg = new MonitorRequestMsg(
                  this.replicationServer.getServerId(), serverId);
              try
              {
                rs.send(msg);
                // Only register this server ID if we were able to send the
                // message.
                pendingMonitorDataServerIDs.add(serverId);
              }
              catch (IOException e)
              {
                // Log a message and do a best effort from here.
                Message message = ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST
                    .get(baseDn, serverId, e.getMessage());
                logError(message);
              }
            }
            // Create the pending response latch based on the number of expected
            // monitor responses.
            pendingMonitorDataLatch = new CountDownLatch(
                pendingMonitorDataServerIDs.size());
          }
          // Wait for the responses to come back.
          pendingMonitorDataLatch.await(5, TimeUnit.SECONDS);
          // Log messages for replication servers that have gone or come back.
          synchronized (pendingMonitorDataLock)
          {
            // Log servers that have come back.
            for (int serverId : monitorDataLateServers)
            {
              // Ensure that we only log once per server: don't fill the
              // error log with repeated messages.
              if (!pendingMonitorDataServerIDs.contains(serverId))
              {
                logError(NOTE_MONITOR_DATA_RECEIVED.get(baseDn,
                    serverId));
              }
            }
            // Log servers that have gone away.
            for (int serverId : pendingMonitorDataServerIDs)
            {
              // Ensure that we only log once per server: don't fill the
              // error log with repeated messages.
              if (!monitorDataLateServers.contains(serverId))
              {
                logError(ERR_MISSING_REMOTE_MONITOR_DATA.get(baseDn,
                    serverId));
              }
            }
            // Remember which servers were late this time.
            monitorDataLateServers.clear();
            monitorDataLateServers.addAll(pendingMonitorDataServerIDs);
          }
          // Store the new computed data as the reference
          synchronized (pendingMonitorDataLock)
          {
            // Now we have the expected answers or an error occurred
            pendingMonitorData.completeComputing();
            monitorData = pendingMonitorData;
            monitorDataLastBuildDate = TimeThread.getTime();
          }
        }
        finally
        {
          synchronized (pendingMonitorDataLock)
          {
            // Clear pending state.
            pendingMonitorData = null;
            pendingMonitorDataLatch = null;
            pendingMonitorDataServerIDs.clear();
          }
        }
      }
    }
    return monitorData;
  }
  /**
   * Start collecting global monitoring information for this
   * ReplicationServerDomain.
   *
   * @param expectedMonitoringMsg The list of server handler we have to wait a
   * monitoring message from. Will be filled as necessary by this method.
   * @throws DirectoryException
   *           In case the monitoring information could not be collected.
   */
  private void initializePendingMonitorData()
  {
    // Let's process our directly connected LSes
    // - in the ServerHandler for a given LS1, the stored state contains :
    // - the max CN produced by LS1
    // - the last CN consumed by LS1 from LS2..n
    // - in the RSdomain/dbHandler, the built-in state contains :
    // - the max CN produced by each server
    // So for a given LS connected we can take the state and the max from
    // the LS/state.
    for (ServerHandler directlsh : directoryServers.values())
    {
      int serverID = directlsh.getServerId();
      // the state comes from the state stored in the SH
      ServerState directlshState = directlsh.getServerState()
          .duplicate();
      // the max CN sent by that LS also comes from the SH
      ChangeNumber maxcn = directlshState
          .getMaxChangeNumber(serverID);
      if (maxcn == null)
      {
        // This directly connected LS has never produced any change
        maxcn = new ChangeNumber(0, 0, serverID);
      }
      pendingMonitorData.setMaxCN(serverID, maxcn);
      pendingMonitorData.setLDAPServerState(serverID, directlshState);
      pendingMonitorData.setFirstMissingDate(serverID,
          directlsh.getApproxFirstMissingDate());
    }
    // Then initialize the max CN for the LS that produced something
    // - from our own local db state
    // - whatever they are directly or indirectly connected
    ServerState dbServerState = getDbServerState();
    pendingMonitorData.setRSState(replicationServer.getServerId(),
        dbServerState);
    Iterator<Integer> it = dbServerState.iterator();
    while (it.hasNext())
    {
      int sid = it.next();
      ChangeNumber storedCN = dbServerState.getMaxChangeNumber(sid);
      pendingMonitorData.setMaxCN(sid, storedCN);
    }
  }
  /**
   * Processes a Monitor message receives from a remote Replication Server and
   * stores the data received.
   *
   * @throws DirectoryException In case the monitoring information could
   *                            not be collected.
   */
  void initializeMonitorData(List<GlobalServerId> expectedMonitoringMsg)
    throws DirectoryException
  {
    synchronized (monitorDataLock)
    {
      wrkMonitorData = new MonitorData();
      if (debugEnabled())
        TRACER.debugInfo(
            "In " + this.replicationServer.getMonitorInstanceName() +
            " baseDn=" + baseDn + " Computing monitor data ");
      // Let's process our directly connected LSes
      // - in the ServerHandler for a given LS1, the stored state contains :
      //   - the max CN produced by LS1
      //   - the last CN consumed by LS1 from LS2..n
      // - in the RSdomain/dbHandler, the built-in state contains :
      //   - the max CN produced by each server
      // So for a given LS connected we can take the state and the max from
      // the LS/state.
      for (ServerHandler directlsh : directoryServers.values())
      {
        int serverID = directlsh.getServerId();
        // the state comes from the state stored in the SH
        ServerState directlshState = directlsh.getServerState().duplicate();
        // the max CN sent by that LS also comes from the SH
        ChangeNumber maxcn = directlshState.getMaxChangeNumber(serverID);
        if (maxcn == null)
        {
          // This directly connected LS has never produced any change
          maxcn = new ChangeNumber(0, 0, serverID);
        }
        wrkMonitorData.setMaxCN(serverID, maxcn);
        wrkMonitorData.setLDAPServerState(serverID, directlshState);
        wrkMonitorData.setFirstMissingDate(serverID,
            directlsh.getApproxFirstMissingDate());
      }
      // Then initialize the max CN for the LS that produced something
      // - from our own local db state
      // - whatever they are directly or indirectly connected
      ServerState dbServerState = getDbServerState();
      wrkMonitorData.setRSState(replicationServer.getServerId(), dbServerState);
      Iterator<Integer> it = dbServerState.iterator();
      while (it.hasNext())
      {
        int sid = it.next();
        ChangeNumber storedCN = dbServerState.getMaxChangeNumber(sid);
        wrkMonitorData.setMaxCN(sid, storedCN);
      }
      // Now we have used all available local informations
      // and we need the remote ones.
      if (debugEnabled())
        TRACER.debugInfo(
            "In " + this.replicationServer.getMonitorInstanceName() +
            " baseDn=" + baseDn + " Local monitor data: " +
            wrkMonitorData.toString());
    }
    // Send the request for remote monitor data to the
    sendMonitorDataRequest(expectedMonitoringMsg);
  }
  /**
   * Complete all the calculation when all monitoring information
   * has been received.
   */
  void completeMonitorData()
  {
    // Store the new computed data as the reference
    synchronized (monitorDataLock)
    {
      // Now we have the expected answers or an error occurred
      wrkMonitorData.completeComputing();
      monitorData = wrkMonitorData;
      wrkMonitorData = null;
      if (debugEnabled())
        TRACER.debugInfo(
            "In " + this.replicationServer.getMonitorInstanceName() +
            " baseDn=" + baseDn + " *** Computed MonitorData: " +
            monitorData.toString());
    }
  }
  /**
   * Sends a MonitorRequest message to all connected RS.
   * @param expectedMonitoringMsg The list of server handler we have to wait a
   * monitoring message from. Will be filled as necessary by this method.
   * @throws DirectoryException when a problem occurs.
   */
  protected void sendMonitorDataRequest(
    List<GlobalServerId> expectedMonitoringMsg)
    throws DirectoryException
  {
    try
    {
      for (ServerHandler rs : replicationServers.values())
      {
        int serverId = rs.getServerId();
        // Store the fact that we expect a MonitoringMsg back from this server
        expectedMonitoringMsg.add(new GlobalServerId(baseDn, serverId));
        MonitorRequestMsg msg =
          new MonitorRequestMsg(this.replicationServer.getServerId(),
          serverId);
        rs.send(msg);
      }
    } catch (Exception e)
    {
      Message message = ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST.get();
      logError(message);
      throw new DirectoryException(ResultCode.OTHER,
        message, e);
    }
  }
  /**
   * Processes a Monitor message receives from a remote Replication Server
   * and stores the data received.
   *
   * @param msg The message to be processed.
   * @param globalServerHandlerId server handler that is receiving the message.
   * @param msg
   *          The message to be processed.
   * @param globalServerHandlerId
   *          server handler that is receiving the message.
   */
  private void receivesMonitorDataResponse(MonitorMsg msg,
    GlobalServerId globalServerId)
      int serverId)
  {
    try
    synchronized (pendingMonitorDataLock)
    {
      synchronized (monitorDataLock)
      if (pendingMonitorData == null)
      {
        if (wrkMonitorData == null)
        {
          // This is a response for an earlier request whose computing is
          // already complete.
          logError(NOTE_IGNORING_REMOTE_MONITOR_DATA.get(
              Integer.toString(msg.getSenderID())));
          return;
        }
        // This is a response for an earlier request whose computing is
        // already complete.
        logError(INFO_IGNORING_REMOTE_MONITOR_DATA.get(baseDn,
            msg.getSenderID()));
        return;
      }
      try
      {
        // Here is the RS state : list <serverID, lastChangeNumber>
        // For each LDAP Server, we keep the max CN across the RSes
        ServerState replServerState = msg.getReplServerDbState();
        wrkMonitorData.setMaxCNs(replServerState);
        pendingMonitorData.setMaxCNs(replServerState);
        // store the remote RS states.
        wrkMonitorData.setRSState(msg.getSenderID(), replServerState);
        pendingMonitorData.setRSState(msg.getSenderID(),
            replServerState);
        // Store the remote LDAP servers states
        Iterator<Integer> lsidIterator = msg.ldapIterator();
@@ -2752,10 +2783,10 @@
        {
          int sid = lsidIterator.next();
          ServerState dsServerState = msg.getLDAPServerState(sid);
          wrkMonitorData.setMaxCNs(dsServerState);
          wrkMonitorData.setLDAPServerState(sid, dsServerState);
          wrkMonitorData.setFirstMissingDate(sid,
            msg.getLDAPApproxFirstMissingDate(sid));
          pendingMonitorData.setMaxCNs(dsServerState);
          pendingMonitorData.setLDAPServerState(sid, dsServerState);
          pendingMonitorData.setFirstMissingDate(sid,
              msg.getLDAPApproxFirstMissingDate(sid));
        }
        // Process the latency reported by the remote RSi on its connections
@@ -2768,50 +2799,49 @@
          {
            // this is the latency of the remote RSi regarding the current RS
            // let's update the fmd of my connected LS
            for (ServerHandler connectedlsh : directoryServers.values())
            for (ServerHandler connectedlsh : directoryServers
                .values())
            {
              int connectedlsid = connectedlsh.getServerId();
              Long newfmd = msg.getRSApproxFirstMissingDate(rsid);
              wrkMonitorData.setFirstMissingDate(connectedlsid, newfmd);
              pendingMonitorData.setFirstMissingDate(connectedlsid,
                  newfmd);
            }
          } else
          }
          else
          {
            // this is the latency of the remote RSi regarding another RSj
            // let's update the latency of the LSes connected to RSj
            ReplicationServerHandler rsjHdr = replicationServers.get(rsid);
            ReplicationServerHandler rsjHdr = replicationServers
                .get(rsid);
            if (rsjHdr != null)
            {
              for (int remotelsid : rsjHdr.getConnectedDirectoryServerIds())
              for (int remotelsid : rsjHdr
                  .getConnectedDirectoryServerIds())
              {
                Long newfmd = msg.getRSApproxFirstMissingDate(rsid);
                wrkMonitorData.setFirstMissingDate(remotelsid, newfmd);
                pendingMonitorData.setFirstMissingDate(remotelsid,
                    newfmd);
              }
            }
          }
        }
        if (debugEnabled())
      }
      catch (RuntimeException e)
      {
        // FIXME: do we really expect these???
        logError(ERR_PROCESSING_REMOTE_MONITOR_DATA.get(e
            .getMessage() + stackTraceToSingleLineString(e)));
      }
      finally
      {
        // Decreases the number of expected responses and potentially
        // wakes up the waiting requestor thread.
        if (pendingMonitorDataServerIDs.remove(serverId))
        {
          if (debugEnabled())
            TRACER.debugInfo(
              "In " + this +
              " baseDn=" + baseDn +
              " Processed msg from " + msg.getSenderID() +
              " New monitor data: " + wrkMonitorData.toString());
          pendingMonitorDataLatch.countDown();
        }
      }
      // Decreases the number of expected responses and potentially
      // wakes up the waiting requestor thread.
      replicationServer.responseReceived(globalServerId);
    } catch (Exception e)
    {
      logError(ERR_PROCESSING_REMOTE_MONITOR_DATA.get(e.getMessage() +
        stackTraceToSingleLineString(e)));
      // If an exception occurs while processing one of the expected message,
      // the processing is aborted and the waiting thread is awoke.
      replicationServer.responseReceivedAll();
    }
  }
@@ -2846,6 +2876,8 @@
  {
    return replicationServers;
  }
  /**
   * A synchronization mechanism is created to insure exclusive access to the
   * domain. The goal is to have a consistent view of the topology by locking
@@ -2868,11 +2900,6 @@
  private ReentrantLock lock = new ReentrantLock();
  /**
   * This lock is used to protect the monitoring computing.
   */
  private final Object monitoringLock = new Object();
  /**
   * This lock is used to protect the generationid variable.
   */
  private final Object generationIDLock = new Object();
@@ -3073,23 +3100,13 @@
    builder.add(baseDn.toString() + " " + generationId);
    attributes.add(builder.toAttribute());
    try
    {
      MonitorData md = computeMonitorData(true);
    MonitorData md = getDomainMonitorData();
      // Missing changes
      long missingChanges =
        md.getMissingChangesRS(replicationServer.getServerId());
      attributes.add(Attributes.create("missing-changes", String.valueOf(
        missingChanges)));
    }
    catch (Exception e)
    {
      Message message =
        ERR_ERROR_RETRIEVING_MONITOR_DATA.get(stackTraceToSingleLineString(e));
      // We failed retrieving the monitor data.
      attributes.add(Attributes.create("error", message.toString()));
    }
    // Missing changes
    long missingChanges = md.getMissingChangesRS(replicationServer
        .getServerId());
    attributes.add(Attributes.create("missing-changes",
        String.valueOf(missingChanges)));
    return attributes;
  }
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
@@ -30,7 +30,6 @@
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import java.io.IOException;
import java.util.ArrayList;
@@ -779,35 +778,25 @@
    attributes.add(Attributes.create("Replication-Server",
        serverURL));
    try
    MonitorData md = replicationServerDomain.getDomainMonitorData();
    // Missing changes
    long missingChanges = md.getMissingChangesRS(serverId);
    attributes.add(Attributes.create("missing-changes",
        String.valueOf(missingChanges)));
    /* get the Server State */
    AttributeBuilder builder = new AttributeBuilder("server-state");
    ServerState state = md.getRSStates(serverId);
    if (state != null)
    {
      MonitorData md;
      md = replicationServerDomain.computeMonitorData(true);
      // Missing changes
      long missingChanges = md.getMissingChangesRS(serverId);
      attributes.add(Attributes.create("missing-changes", String
          .valueOf(missingChanges)));
      /* get the Server State */
      AttributeBuilder builder = new AttributeBuilder("server-state");
      ServerState state = md.getRSStates(serverId);
      if (state != null)
      for (String str : state.toStringSet())
      {
        for (String str : state.toStringSet())
        {
          builder.add(str);
        }
        attributes.add(builder.toAttribute());
        builder.add(str);
      }
      attributes.add(builder.toAttribute());
    }
    catch (Exception e)
    {
      Message message =
        ERR_ERROR_RETRIEVING_MONITOR_DATA.get(stackTraceToSingleLineString(e));
      // We failed retrieving the monitor data.
      attributes.add(Attributes.create("error", message.toString()));
    }
    return attributes;
  }
  /**