From 3a13fe291b53c7e6c784169ac77d5f3ea26ea577 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 01 Dec 2026 20:10:28 +0000
Subject: [PATCH] Recognize recovered startup timeouts on rolling replication servers (#1354)
---
.github/scripts/replication/disturb-scale.sh | 5 ++---
.github/scripts/replication/selftest-disturb-scale.sh | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/.github/scripts/replication/disturb-scale.sh b/.github/scripts/replication/disturb-scale.sh
index 8fcc72f..41442a1 100644
--- a/.github/scripts/replication/disturb-scale.sh
+++ b/.github/scripts/replication/disturb-scale.sh
@@ -498,7 +498,7 @@
# may finish after CORE135; only timeouts before that startup marker are candidates.
# Admin/schema domains have their own DS IDs; another live RS may win the retry.
# Keep the full error as evidence so another record cannot inherit the allowance.
-scale_record_reconnected_timeouts() { # <DS> <rolling RS> <direction>
+scale_record_reconnected_timeouts() { # <restarted node> <rolling RS> <direction>
local node=$1 direction=$3 window="$OUT/logs/$1.window-$3-$1"
local before after mark candidate address addresses= target="$OUT/scale-progress/timeouts-$3-$1.txt"
[ -f "$window" ] && [ -f "$OUT/logs/$node.mark" ] || return 0
@@ -662,8 +662,7 @@
# Startup opens LDAP before the background join has finished its administrative
# JVMs. Keep this group paused until every join succeeds, while the other DSs keep
# writing. This also completes the group before the next surviving writer rolls.
- scale_wait "the join of $rolling_rs ends" bootstrap_ended "$rolling_rs" || return 1
- for node in "$first" "$second"; do
+ for node in "$rolling_rs" "$first" "$second"; do
scale_wait "the join of $node ends" bootstrap_ended "$node" || return 1
scale_record_reconnected_timeouts "$node" "$rolling_rs" "$direction" || return 1
done
diff --git a/.github/scripts/replication/selftest-disturb-scale.sh b/.github/scripts/replication/selftest-disturb-scale.sh
index a40a7f3..2985327 100755
--- a/.github/scripts/replication/selftest-disturb-scale.sh
+++ b/.github/scripts/replication/selftest-disturb-scale.sh
@@ -552,6 +552,26 @@
grep -Fx 'dn: uid=scale-down-r0,ou=People,dc=example,dc=com' "$OUT/probe.ldif" >/dev/null || { echo 'batch lacks the RS write' >&2; exit 1; }
if (FAIL_PROBE=1; scale_probe_batch d2 up d0 d1 r0); then echo 'failed batch accepted' >&2; exit 1; fi
fi
+ # A dedicated RS also runs a DS for its administrative domains.
+ if [ "$topology-$mode" = rs534-kept ]; then (
+ . "$HERE/assert-converged.sh"
+ OUT="$OUT/rs-startup"; mkdir -p "$OUT/logs"
+ for n in $ALL_NODES; do : >"$OUT/$n.log"; done
+ errors_lines() { wc -l <"$OUT/$1.log"; }
+ since_mark() { cat "$OUT/$1.log"; }
+ printf '0\n' >"$OUT/logs/r0.mark"
+ local timeout='[t] category=SYNC severity=ERROR msgID=212 msg=Directory server DS(17231) timed out while connecting to replication server r0:8989 for domain "cn=admin data"'
+ local unrecovered=${timeout/cn=admin data/cn=schema}
+ start_server() {
+ [ "$1" = r0 ] || return 0
+ printf '%s\n' "$timeout" "$unrecovered" \
+ '[t] category=CORE severity=NOTICE msgID=135 msg=The Directory Server has started successfully' \
+ '[t] category=SYNC severity=NOTICE msgID=62 msg=Directory server DS(17231) has connected to replication server RS(32517) for domain "cn=admin data" at 172.18.0.18:8989 with generation ID 154864' >>"$OUT/r0.log"
+ }
+ bootstrap_ended() { return 0; }
+ scale_roll_pair d0 d1 "$FULL_PEERS" r0
+ [ "$(replication_errors r0)" = "$unrecovered" ] || { echo 'expected only the unrecovered RS startup timeout' >&2; exit 1; }
+ ); fi
)
check_checkpoint_budget() ( # <load end> <caught up at> <expected result> <expected time> [route change at]
local caught_up_at=$2 switch_at=${5:-} result=0
--
Gitblit v1.10.0