From 016502d22e0490ed8b1b4951f5e12be01c4a224c Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Mon, 03 Aug 2026 16:13:03 +0000
Subject: [PATCH] [#807] Do not drop persistent search notifications through search-phase dedup (#812)

---
 opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPClientConnection.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPClientConnection.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPClientConnection.java
index b2650ef..0b44242 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPClientConnection.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2006-2010 Sun Microsystems, Inc.
  * Portions Copyright 2010-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.opends.server.protocols.ldap;
 
@@ -678,7 +679,11 @@
     // if operation processing encounters a run-time exception after sending the
     // response: the worker thread exception handling code will attempt to send
     // an error result to the client indicating that a problem occurred.
-    if (removeOperationInProgress(operation.getMessageID()))
+    // A persistent search is the other way around: its search operation is no longer in progress
+    // once the search phase is over, and yet it still owes the client a response if the server
+    // terminates it.
+    if (removeOperationInProgress(operation.getMessageID())
+        || hasPersistentSearch(operation.getMessageID()))
     {
       LDAPMessage message = operationToResponseLDAPMessage(operation);
       if (message != null)

--
Gitblit v1.10.0