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/forgerock/opendj/reactive/LDAPClientConnection2.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.java b/opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.java
index 7779dc7..7cf99df 100644
--- a/opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.java
+++ b/opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.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.forgerock.opendj.reactive;
 
@@ -405,7 +406,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())) {
             final Response response = operationToResponse(operation);
             final FlowableEmitter<Response> out = getAttachedEmitter(operation);
             if (response != null) {

--
Gitblit v1.10.0