From 641ff2ce8441a33717bdf066c3b0ae2fe96ba271 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 12 Aug 2026 18:20:32 +0000
Subject: [PATCH] [#861] Fail fast when a total update request gets no answer (#864)
---
opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java b/opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java
index d3c080d..f9eb7c3 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java
@@ -40,6 +40,14 @@
{
private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
+ /**
+ * Delay after which the initialization is considered stalled when the
+ * request for entries has received no answer from the topology: the request
+ * or its response can be silently lost with no error reported back (issue
+ * #861), and no other mechanism bounds this wait.
+ */
+ private static final long INITIALIZE_START_TIMEOUT_MS = 2 * 60 * 1000L;
+
private String domainString;
private int source;
private LDAPReplicationDomain domain;
@@ -120,6 +128,7 @@
initStateLock.wait(1000);
replaceAttributeValue(ATTR_TASK_INITIALIZE_LEFT, String.valueOf(left));
replaceAttributeValue(ATTR_TASK_INITIALIZE_DONE, String.valueOf(total-left));
+ domain.abortStalledInitializeFromRemote(INITIALIZE_START_TIMEOUT_MS);
}
}
replaceAttributeValue(ATTR_TASK_INITIALIZE_LEFT, String.valueOf(left));
--
Gitblit v1.10.0