From 2d99dd7e2843c998a2d15f072cb827f443a79809 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 23 Sep 2026 07:39:43 +0000
Subject: [PATCH] [#1014] Report a ReplicaOfflineMsg as forwarded only to a peer which can decode it (#1019)
---
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java
index 05232fe..961cd88 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java
@@ -1721,21 +1721,25 @@
* to. With no such server connected there is nobody to forward the message to, and waiting
* would only delay the shutdown by the whole grace period.
* <p>
+ * A peer which negotiated a protocol version the message has no encoding for is no such
+ * server either: nothing is ever sent to it and no writer will ever report a forward for it.
+ * <p>
* The recipients DSRSShutdownSync records when the message is queued are the sharper source of
* truth and cover the domains this test lets through - a peer which connected after the
- * message was queued owes nothing, and is not waited for. What this test still covers is the
- * announcement which was never queued here at all, and for which no recipient can therefore be
- * recorded: the message of a replica which picked a remote replication server, or the
- * announcement of issue #918 recorded after its message was relayed. Those wait out the whole
- * grace period on the first forward, and on a server with no peer connected nothing would ever
- * report one.
+ * message was queued owes nothing, and is not waited for, and the writer of a peer which
+ * cannot decode the message strikes it off when it drops it. What this test still covers is
+ * the announcement which was never queued here at all, and for which no recipient can
+ * therefore be recorded: the message of a replica which picked a remote replication server, or
+ * the announcement of issue #918 recorded after its message was relayed. Those wait out the
+ * whole grace period on the first forward, and on a server whose only peers cannot decode the
+ * message - or with no peer connected at all - nothing would ever report one.
*/
private void awaitReplicaOfflineMsgsForwarded()
{
final List<DN> domainsToWaitFor = new ArrayList<>();
for (ReplicationServerDomain domain : getReplicationServerDomains())
{
- if (!domain.getConnectedRSs().isEmpty())
+ if (domain.hasPeerWhichCanReceiveReplicaOfflineMsgs())
{
domainsToWaitFor.add(domain.getBaseDN());
}
--
Gitblit v1.10.0