From f0a287fcba94440f81845a04fd0b6a4a70075a2c Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Mon, 19 Oct 2026 08:28:51 +0000
Subject: [PATCH] [#1195] Publish every change done while a recovery runs, and end the recovery only once they are out (#1204)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeDelOperation.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeDelOperation.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeDelOperation.java
index 6e11f82..af49740 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeDelOperation.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeDelOperation.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2009 Sun Microsystems, Inc.
  * Portions copyright 2012-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.opends.server.replication.plugin;
 
@@ -32,6 +33,8 @@
 {
   private final DN dn;
   private final String entryUUID;
+  /** Whether a replication server has taken the delete: set by the threads which publish it. */
+  private volatile boolean published;
 
   /**
    * Creates a new FakeDelOperation from the provided information.
@@ -64,4 +67,31 @@
   {
     return entryUUID;
   }
+
+  /**
+   * Retrieves the DN of the entry that was deleted with this operation.
+   *
+   * @return  The DN of the entry that was deleted with this operation.
+   */
+  DN getDN()
+  {
+    return dn;
+  }
+
+  /** Records that a replication server has taken the delete: the broker wrote it to a session. */
+  void published()
+  {
+    published = true;
+  }
+
+  /**
+   * Tells whether a replication server has taken the delete: one which none has is published by
+   * nobody once it is dropped from the deletes the domain keeps aside.
+   *
+   * @return {@code true} if the broker wrote the delete to a session
+   */
+  boolean isPublished()
+  {
+    return published;
+  }
 }

--
Gitblit v1.10.0