From 41f5692c778b797fe09b5a658af37e4bc1da83ad Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Thu, 24 Sep 2026 11:56:08 +0000
Subject: [PATCH] [#1061] Ask for the session restart under an owner as well, and leave it to the state checkpointer (#1062)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/RemotePendingChanges.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/RemotePendingChanges.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/RemotePendingChanges.java
index 5835b12..085d147 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/RemotePendingChanges.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/RemotePendingChanges.java
@@ -332,8 +332,12 @@
    * now is the double replay the ownership is there to prevent (issue #922).
    *
    * @param csn the CSN of the change whose replay failed
+   * @return whether the change was given back: {@code false} when it is not listed as an
+   *         uncommitted change anymore - the domain forgot its pending changes while it was
+   *         being replayed - or when another thread owns it, in which case nothing was
+   *         released here and there is no delivery for a session restart to ask for
    */
-  public void replayFailed(CSN csn)
+  public boolean replayFailed(CSN csn)
   {
     pendingChangesWriteLock.lock();
     try
@@ -343,7 +347,9 @@
       {
         change.setOwner(null);
         changeBeingReplayed.remove(Thread.currentThread(), csn);
+        return true;
       }
+      return false;
     }
     finally
     {

--
Gitblit v1.10.0