From 3f714047d842eb699d564daa49345c1d852bce71 Mon Sep 17 00:00:00 2001 From: SqlRush Date: Sat, 11 Jul 2026 11:22:25 +0800 Subject: [PATCH] test(cluster): pin t/335's primaries before they start The PR#34 pin block for t/335 sat after the standby section, but the two primaries start earlier -- they still booted with the default 2-worker pool on single data ports (cross-wire, pg_ctl start failed, whole-shard bailout masking t/336-339). Move the primary pins ahead of their ->start. With the ordering fixed the file returns exactly to its PRE-merge failure shape (exit 29 after 10 tests -- the pre-existing ADG apply-master leg, red on main before the spec-7.3 merge in nightly run 29096781649), so the merge-added regression layer is gone and the remaining red is the known baseline. Spec: spec-7.3-lms-worker-pool.md --- src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl b/src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl index 644dde0e83..614f602f90 100644 --- a/src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl +++ b/src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl @@ -243,6 +243,10 @@ sub wait_for_log_match_from $primary0->append_conf('postgresql.conf', "cluster.node_id = 0\n"); $primary1->append_conf('postgresql.conf', $primary_common_conf); $primary1->append_conf('postgresql.conf', "cluster.node_id = 1\n"); +# spec-7.3: pin the pool BEFORE the primaries start (the block further down +# runs after ->start and cannot help them) -- one data port per node here. +$primary0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); +$primary1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); write_pair_conf($primary0, $primary1, 'adg2_primary'); $primary0->start; $primary1->start; @@ -296,8 +300,6 @@ sub wait_for_log_match_from # cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the # pool to one worker: N=1 is the spec-7.2 topology identity this rig was # written against. -$primary0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); -$primary1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); $standby0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); $standby1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n"); write_pair_conf($standby0, $standby1, 'adg2_standby');