From ea629fa971db08f2267b50522360563a8fec7f86 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 27 May 2010 15:28:09 +0000
Subject: [PATCH] Fix for issues #3395 and #3998. The changes improves the replica initialization protocol, especially flow control and handling connection outage.

---
 opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
index 7b15507..17a704f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -49,6 +49,9 @@
 import org.opends.server.replication.protocol.AckMsg;
 import org.opends.server.replication.protocol.ChangeTimeHeartbeatMsg;
 import org.opends.server.replication.protocol.ErrorMsg;
+import org.opends.server.replication.protocol.EntryMsg;
+import org.opends.server.replication.protocol.InitializeRequestMsg;
+import org.opends.server.replication.protocol.InitializeTargetMsg;
 import org.opends.server.replication.protocol.HeartbeatThread;
 import org.opends.server.replication.protocol.MonitorMsg;
 import org.opends.server.replication.protocol.ProtocolSession;
@@ -952,7 +955,7 @@
     if (debugEnabled())
       TRACER.debugInfo("In " + replicationServerDomain.getReplicationServer().
           getMonitorInstanceName() + this +
-          " processes received msg:\n" + msg);
+          " processes routable msg received:" + msg);
     replicationServerDomain.process(msg, this);
   }
 
@@ -1012,8 +1015,11 @@
           replicationServerDomain.getReplicationServer().
           getMonitorInstanceName() + this +
           " publishes message:\n" + msg);
+
     // Currently only MonitorMsg has to support a backward compatibility
-    if (msg instanceof MonitorMsg)
+    if ((msg instanceof MonitorMsg) || (msg instanceof ErrorMsg) ||
+        (msg instanceof EntryMsg) || (msg instanceof InitializeRequestMsg) ||
+        (msg instanceof InitializeTargetMsg))
     {
       session.publish(msg, protocolVersion);
     } else

--
Gitblit v1.10.0