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

Valery Kharseko
15 hours ago 600df926522919b63bfca2816ef9588b6f1c6e34
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -828,7 +828,8 @@
     * The generator time is adjusted to the time of the last CSN received from
     * remote other servers.
     */
    pendingChanges = new PendingChanges(getGenerator(), this);
    pendingChanges = new PendingChanges(getGenerator(), this,
        new ShutdownSyncAnnouncer(dsrsShutdownSync, getBaseDN()));
    remotePendingChanges = new RemotePendingChanges(getServerState());
    // listen for changes on the configuration
@@ -2271,17 +2272,13 @@
  public void publishReplicaOfflineMsg()
  {
    final CSN offlineCSN = pendingChanges.putReplicaOfflineMsg();
    if (offlineCSN != null)
    if (offlineCSN == null && logger.isTraceEnabled())
    {
      /*
       * Only a message which really was published is announced: the shutdown of a collocated
       * replication server waits for it to be forwarded, and would spend the whole grace
       * period waiting for one which never reached the wire.
       * The announcement itself is made where the message is published, so nothing has to be
       * reported here: a message a change in flight held back was never announced, and the
       * announcement of one the broker refused has been withdrawn.
       */
      dsrsShutdownSync.replicaOfflineMsgSent(getBaseDN(), offlineCSN);
    }
    else if (logger.isTraceEnabled())
    {
      logger.trace("Replica " + getServerId() + " of domain baseDN=" + getBaseDN()
          + " could not announce itself offline: the message was not published - a change which"
          + " is still in flight holds it back, or the broker had no session to write it to,"