From 7606bd26f14a4b9755577bc7dad8ea57c36e7ba1 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 22 Sep 2026 09:33:34 +0000
Subject: [PATCH] [#1029] Send a directory server only the updates it gives send-window credit for (#1034)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java
index 9c91cec..3f2ecdd 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java
@@ -126,12 +126,12 @@
           session.publish(updateMsg);
           /*
            * Only the forward to a peer RS ends the wait of the shutdown: what the grace period
-           * buys is the rest of the topology learning that the replica went offline.
-           * ReplicationServerDomain.put() never queues this message for a directory server - its
-           * isUpdateMsgFiltered() drops it there - but a directory server which is catching up
-           * reads its updates from the changelog, where ReplicaCursor synthesizes a
-           * ReplicaOfflineMsg from the offline CSN of the replica. Publishing that one says
-           * nothing about the peer RSs the shutdown is waiting for.
+           * buys is the rest of the topology learning that the replica went offline. A directory
+           * server is never handed this message - ReplicationServerDomain.put() does not queue
+           * it for one, and DataServerHandler.updateServerState() drops the one the changelog
+           * cursor of a directory server which is catching up synthesizes from the offline CSN
+           * of the replica (issue #1029) - so the guard says whose forward counts rather than
+           * telling two deliveries apart.
            */
           if (updateMsg instanceof ReplicaOfflineMsg && !handler.isDataServer())
           {

--
Gitblit v1.10.0