From df0e36ba23d4992009b1b694bb5cb37ba9587836 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 23 Jun 2009 15:13:22 +0000
Subject: [PATCH] Remove dead code in the replication without any functionality change.

---
 opends/src/server/org/opends/server/replication/server/ServerHandler.java |   34 +++-------------------------------
 1 files changed, 3 insertions(+), 31 deletions(-)

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 96f8a45..24dd0a4 100644
--- a/opends/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -184,8 +184,6 @@
    */
   int sendWindowSize;
 
-  private int saturationCount = 0;
-
   /**
    * The protocol version established with the remote server.
    */
@@ -315,19 +313,9 @@
   {
     if (rcvWindow < rcvWindowSizeHalf)
     {
-      if (flowControl)
-      {
-        if (replicationServerDomain.restartAfterSaturation(this))
-        {
-          flowControl = false;
-        }
-      }
-      if (!flowControl)
-      {
-        WindowMsg msg = new WindowMsg(rcvWindowSizeHalf);
-        session.publish(msg);
-        rcvWindow += rcvWindowSizeHalf;
-      }
+      WindowMsg msg = new WindowMsg(rcvWindowSizeHalf);
+      session.publish(msg);
+      rcvWindow += rcvWindowSizeHalf;
     }
   }
 
@@ -1183,22 +1171,6 @@
     boolean interrupted = true;
     UpdateMsg msg = getnextMessage(true); // synchronous:block until msg
 
-    /*
-     * When we remove a message from the queue we need to check if another
-     * server is waiting in flow control because this queue was too long.
-     * This check might cause a performance penalty an therefore it
-     * is not done for every message removed but only every few messages.
-     */
-    if (++saturationCount > 10)
-    {
-      saturationCount = 0;
-      try
-      {
-        replicationServerDomain.checkAllSaturation();
-      } catch (IOException e)
-      {
-      }
-    }
     boolean acquired = false;
     do
     {

--
Gitblit v1.10.0