From 0c29df8cefccbf0722819c81fbb64ddc0be99b53 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Fri, 11 Sep 2026 13:07:46 +0000
Subject: [PATCH] [#928] Compare the permissive-modify DN with the entry DN the operation reports (#973)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 8daed89..2fa2094 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -2662,7 +2662,16 @@
                 if (op instanceof ModifyOperation)
                 {
                   ModifyOperation modifyOperation = (ModifyOperation) op;
-                  if (modifyOperation.getEntryDN().equals(SET_PERMISSIVE_MODIFY_FOR_DN))
+                  /*
+                   * The DN this looks for is compared with what the operation reports rather
+                   * than the other way round: getEntryDN() returns null - and reports
+                   * INVALID_DN_SYNTAX - for an operation whose raw DN does not parse, and the
+                   * replay must report that once and step over the change rather than throw
+                   * before the CSN of the operation has been read, which would keep the change
+                   * out of the ServerState and have it asked for again for the whole give-up
+                   * window (issue #928).
+                   */
+                  if (SET_PERMISSIVE_MODIFY_FOR_DN.equals(modifyOperation.getEntryDN()))
                   {
                     op.addRequestControl(new LDAPControl(OID_PERMISSIVE_MODIFY_CONTROL));
                   }

--
Gitblit v1.10.0