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

Valery Kharseko
2 days ago 9e8bd8d694d82ec117c2c4a89c5d1aab2e52af94
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java
@@ -115,21 +115,30 @@
           * ReplicationServerDomain.put() applied when it queued the message, so a peer RS can
           * be given a message this drops - the shutdown must stop waiting for a forward which
           * will never be reported.
           * <p>
           * The permit take() charged it is given back as well, whichever filter dropped it: the
           * server never receives it, so no credit will ever come for it, and nor is it counted
           * as sent (issue #1080).
           */
          handler.releasePermitInSendWindow();
          if (updateMsg instanceof ReplicaOfflineMsg && !handler.isDataServer())
          {
            dsrsShutdownSync.replicaOfflineMsgNotForwarded(
                replicationServerDomain.getBaseDN(), handler.getServerId());
          }
        }
        else if (updateMsg instanceof ReplicaOfflineMsg && !handler.isDataServer())
        {
          forwardReplicaOfflineMsg((ReplicaOfflineMsg) updateMsg);
        }
        else
        {
          // Publish the update to the remote server using a protocol version it supports
          session.publish(updateMsg);
          handler.countSentUpdate(updateMsg);
          if (updateMsg instanceof ReplicaOfflineMsg && !handler.isDataServer())
          {
            forwardReplicaOfflineMsg((ReplicaOfflineMsg) updateMsg);
          }
          else
          {
            // Publish the update to the remote server using a protocol version it supports
            session.publish(updateMsg);
          }
        }
      }
    }