From a057fce149380d59ec0f601164756ad3fafa1e84 Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Tue, 8 Apr 2025 11:54:03 +0000 Subject: [PATCH] Remove unused citus-tools subproject and update regression test output for clarity --- citus-tools | 1 - src/test/regress/expected/issue_7896.out | 13 +++++-------- src/test/regress/sql/issue_7896.sql | 12 +++++------- 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 160000 citus-tools diff --git a/citus-tools b/citus-tools deleted file mode 160000 index 3376bd684..000000000 --- a/citus-tools +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3376bd6845f0614908ed304f5033bd644c82d3bf diff --git a/src/test/regress/expected/issue_7896.out b/src/test/regress/expected/issue_7896.out index cbb1c31dc..23dcc9856 100644 --- a/src/test/regress/expected/issue_7896.out +++ b/src/test/regress/expected/issue_7896.out @@ -7,19 +7,17 @@ -- replication slot on a worker. This, in turn, prevents DROP DATABASE -- (with FORCE) from succeeding. -- --- With your fix applied, the underlying rebalance job is canceled, --- no zombie slot remains, and DROP DATABASE succeeds. +-- With the fix applied, the underlying rebalance job is canceled, +-- no zombie slot remains. --------------------------------------------------------------------- --------------------------------------------------------------------- --- 1) Create an isolated schema for this test. +-- 1) Setup the test environment. --------------------------------------------------------------------- CREATE SCHEMA issue_7896; SET search_path TO issue_7896; --------------------------------------------------------------------- -- 2) Set cluster parameters and initialize environment. --------------------------------------------------------------------- --- We assume a coordinator with at least two workers. --- Set replication factor to 2 and enable repartition joins. SET citus.shard_replication_factor TO 2; SET citus.enable_repartition_joins TO ON; -- For faster background task processing, set a short background task queue interval. @@ -98,7 +96,6 @@ HINT: To monitor progress, run: SELECT * FROM citus_rebalance_status(); (1 row) -- Expected: Notice that moves are scheduled as a background job. --- (You may verify with: SELECT * FROM citus_rebalance_status();) --------------------------------------------------------------------- -- 8) Attempt to wait on the rebalance with a short timeout so that the wait -- is canceled. The PG_CATCH block in citus_job_wait_internal should then @@ -129,7 +126,7 @@ SET statement_timeout = '0'; CALL citus_cleanup_orphaned_resources(); NOTICE: cleaned up 5 orphaned resources --------------------------------------------------------------------- --- 12) Traverse nodes and check for active replication slots. +-- 10) Traverse nodes and check for active replication slots. -- -- Connect to the coordinator and worker nodes, then query for replication slots. -- Expected Outcome (with the fix applied): No active replication slots. @@ -157,5 +154,5 @@ SELECT * FROM pg_replication_slots; --------------------------------------------------------------------- \c - - - :master_port SET search_path TO issue_7896; +SET client_min_messages TO WARNING; DROP SCHEMA IF EXISTS issue_7896 CASCADE; -NOTICE: drop cascades to table t1 diff --git a/src/test/regress/sql/issue_7896.sql b/src/test/regress/sql/issue_7896.sql index 679a5373d..2447aba81 100644 --- a/src/test/regress/sql/issue_7896.sql +++ b/src/test/regress/sql/issue_7896.sql @@ -1,5 +1,5 @@ --------------------------------------------------------------------- --- Regression Test: Simulate zombie replication slot when +-- Regression Test: Simulate zombie replication slot when -- citus_rebalance_wait() is canceled. -- -- In the buggy behavior, canceling citus_rebalance_wait() @@ -7,12 +7,12 @@ -- replication slot on a worker. This, in turn, prevents DROP DATABASE -- (with FORCE) from succeeding. -- --- With your fix applied, the underlying rebalance job is canceled, --- no zombie slot remains, and DROP DATABASE succeeds. +-- With the fix applied, the underlying rebalance job is canceled, +-- no zombie slot remains. --------------------------------------------------------------------- --------------------------------------------------------------------- --- 1) Create an isolated schema for this test. +-- 1) Setup the test environment. --------------------------------------------------------------------- CREATE SCHEMA issue_7896; SET search_path TO issue_7896; @@ -20,8 +20,6 @@ SET search_path TO issue_7896; --------------------------------------------------------------------- -- 2) Set cluster parameters and initialize environment. --------------------------------------------------------------------- --- We assume a coordinator with at least two workers. --- Set replication factor to 2 and enable repartition joins. SET citus.shard_replication_factor TO 2; SET citus.enable_repartition_joins TO ON; -- For faster background task processing, set a short background task queue interval. @@ -64,7 +62,6 @@ SELECT citus_rebalance_start( shard_transfer_mode := 'force_logical' ); -- Expected: Notice that moves are scheduled as a background job. --- (You may verify with: SELECT * FROM citus_rebalance_status();) --------------------------------------------------------------------- -- 8) Attempt to wait on the rebalance with a short timeout so that the wait @@ -113,5 +110,6 @@ SELECT * FROM pg_replication_slots; --------------------------------------------------------------------- \c - - - :master_port SET search_path TO issue_7896; +SET client_min_messages TO WARNING; DROP SCHEMA IF EXISTS issue_7896 CASCADE;