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

gbellato
23.13.2009 df0e36ba23d4992009b1b694bb5cb37ba9587836
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
    {