From 081506cd0a6be7d9a124fedaa3c1357ab1c4588c Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Mon, 26 May 2008 16:11:50 +0000
Subject: [PATCH] improve log for 2911 - dsreplication pre/post-external initialisation fails to clear all the changelogs

---
 opends/src/server/org/opends/server/replication/server/ServerWriter.java  |    6 +++++-
 opends/src/server/org/opends/server/replication/server/ServerHandler.java |    6 +++++-
 opends/src/messages/messages/replication.properties                       |    4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/opends/src/messages/messages/replication.properties b/opends/src/messages/messages/replication.properties
index 9efd1c4..d0e6d76 100644
--- a/opends/src/messages/messages/replication.properties
+++ b/opends/src/messages/messages/replication.properties
@@ -210,8 +210,8 @@
 MILD_ERR_ERROR_MSG_RECEIVED_79=The following error has been received : <%s>
 MILD_ERR_IGNORING_UPDATE_FROM_80=Update <%s> received from server <%s> is \
 ignored due to a bad generation ID of this server
-MILD_ERR_IGNORING_UPDATE_TO_81=Update <%s> will not be sent to server %s that has \
-not the right generation ID
+MILD_ERR_IGNORING_UPDATE_TO_81=In %s, update <%s> will not be sent to server %s\
+ with generation ID=%s different from expected generation ID=%s
 SEVERE_ERR_INIT_IMPORT_NOT_SUPPORTED_82= Initialization cannot be done because \
 import is not supported by the backend %s
 SEVERE_ERR_INIT_EXPORT_NOT_SUPPORTED_83= Initialization cannot be done because \
diff --git a/opends/src/server/org/opends/server/replication/server/ServerHandler.java b/opends/src/server/org/opends/server/replication/server/ServerHandler.java
index 68b2ba0..c56fc8a 100644
--- a/opends/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -1004,8 +1004,12 @@
         (referenceGenerationId != generationId))
     {
       logError(ERR_IGNORING_UPDATE_TO.get(
+               this.replicationServerDomain.getReplicationServer().
+                 getMonitorInstanceName(),
                update.getDn(),
-               this.getMonitorInstanceName()));
+               this.getMonitorInstanceName(),
+               Long.toString(generationId),
+               Long.toString(referenceGenerationId)));
 
       return;
     }
diff --git a/opends/src/server/org/opends/server/replication/server/ServerWriter.java b/opends/src/server/org/opends/server/replication/server/ServerWriter.java
index 170378f..f30edf3 100644
--- a/opends/src/server/org/opends/server/replication/server/ServerWriter.java
+++ b/opends/src/server/org/opends/server/replication/server/ServerWriter.java
@@ -115,8 +115,12 @@
             || (handler.getGenerationId() == -1))
         {
           logError(ERR_IGNORING_UPDATE_TO.get(
+              this.replicationServerDomain.getReplicationServer().
+                getMonitorInstanceName(),
               update.getDn(),
-              this.handler.getMonitorInstanceName()));
+              this.handler.getMonitorInstanceName(),
+              Long.toString(handler.getGenerationId()),
+              Long.toString(referenceGenerationId)));
           continue;
         }
 

--
Gitblit v1.10.0