Remove unused citus-tools subproject and update regression test output for clarity

m3hm3t/issue_7896
Mehmet Yilmaz 2025-04-08 11:54:03 +00:00
parent 23a4671a68
commit a057fce149
3 changed files with 10 additions and 16 deletions

@ -1 +0,0 @@
Subproject commit 3376bd6845f0614908ed304f5033bd644c82d3bf

View File

@ -7,19 +7,17 @@
-- replication slot on a worker. This, in turn, prevents DROP DATABASE -- replication slot on a worker. This, in turn, prevents DROP DATABASE
-- (with FORCE) from succeeding. -- (with FORCE) from succeeding.
-- --
-- With your fix applied, the underlying rebalance job is canceled, -- With the fix applied, the underlying rebalance job is canceled,
-- no zombie slot remains, and DROP DATABASE succeeds. -- no zombie slot remains.
--------------------------------------------------------------------- ---------------------------------------------------------------------
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- 1) Create an isolated schema for this test. -- 1) Setup the test environment.
--------------------------------------------------------------------- ---------------------------------------------------------------------
CREATE SCHEMA issue_7896; CREATE SCHEMA issue_7896;
SET search_path TO issue_7896; SET search_path TO issue_7896;
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- 2) Set cluster parameters and initialize environment. -- 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.shard_replication_factor TO 2;
SET citus.enable_repartition_joins TO ON; SET citus.enable_repartition_joins TO ON;
-- For faster background task processing, set a short background task queue interval. -- 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) (1 row)
-- Expected: Notice that moves are scheduled as a background job. -- 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 -- 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 -- 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(); CALL citus_cleanup_orphaned_resources();
NOTICE: cleaned up 5 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. -- Connect to the coordinator and worker nodes, then query for replication slots.
-- Expected Outcome (with the fix applied): No active replication slots. -- Expected Outcome (with the fix applied): No active replication slots.
@ -157,5 +154,5 @@ SELECT * FROM pg_replication_slots;
--------------------------------------------------------------------- ---------------------------------------------------------------------
\c - - - :master_port \c - - - :master_port
SET search_path TO issue_7896; SET search_path TO issue_7896;
SET client_min_messages TO WARNING;
DROP SCHEMA IF EXISTS issue_7896 CASCADE; DROP SCHEMA IF EXISTS issue_7896 CASCADE;
NOTICE: drop cascades to table t1

View File

@ -1,5 +1,5 @@
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Regression Test: Simulate zombie replication slot when -- Regression Test: Simulate zombie replication slot when
-- citus_rebalance_wait() is canceled. -- citus_rebalance_wait() is canceled.
-- --
-- In the buggy behavior, canceling citus_rebalance_wait() -- In the buggy behavior, canceling citus_rebalance_wait()
@ -7,12 +7,12 @@
-- replication slot on a worker. This, in turn, prevents DROP DATABASE -- replication slot on a worker. This, in turn, prevents DROP DATABASE
-- (with FORCE) from succeeding. -- (with FORCE) from succeeding.
-- --
-- With your fix applied, the underlying rebalance job is canceled, -- With the fix applied, the underlying rebalance job is canceled,
-- no zombie slot remains, and DROP DATABASE succeeds. -- no zombie slot remains.
--------------------------------------------------------------------- ---------------------------------------------------------------------
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- 1) Create an isolated schema for this test. -- 1) Setup the test environment.
--------------------------------------------------------------------- ---------------------------------------------------------------------
CREATE SCHEMA issue_7896; CREATE SCHEMA issue_7896;
SET search_path TO 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. -- 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.shard_replication_factor TO 2;
SET citus.enable_repartition_joins TO ON; SET citus.enable_repartition_joins TO ON;
-- For faster background task processing, set a short background task queue interval. -- 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' shard_transfer_mode := 'force_logical'
); );
-- Expected: Notice that moves are scheduled as a background job. -- 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 -- 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 \c - - - :master_port
SET search_path TO issue_7896; SET search_path TO issue_7896;
SET client_min_messages TO WARNING;
DROP SCHEMA IF EXISTS issue_7896 CASCADE; DROP SCHEMA IF EXISTS issue_7896 CASCADE;