blob: 0857b3b7a2a0e149d1a52bd0f2d666e752d9b795 [file] [log] [blame]
-- TEST 1: block checkpoint on segments
-- pause the 2PC after setting inCommit flag
select gp_inject_fault_infinite('before_xlog_xact_commit_prepared', 'suspend', 3);
gp_inject_fault_infinite
--------------------------
Success:
(1 row)
-- trigger a 2PC, and it will block at commit;
2: checkpoint;
CHECKPOINT
2: begin;
BEGIN
2: create table t_commit_transaction_block_checkpoint (c int) distributed by (c);
CREATE
2&: commit; <waiting ...>
-- wait for the fault to trigger since following checkpoint could be faster
select gp_wait_until_triggered_fault('before_xlog_xact_commit_prepared', 1, 3);
gp_wait_until_triggered_fault
-------------------------------
Success:
(1 row)
-- do checkpoint on segment content 1 in utility mode, and it should block
1U&: checkpoint; <waiting ...>
-- resume the 2PC after setting inCommit flag
select gp_inject_fault('before_xlog_xact_commit_prepared', 'reset', 3);
gp_inject_fault
-----------------
Success:
(1 row)
2<: <... completed>
COMMIT
1U<: <... completed>
CHECKPOINT
-- TEST 2: block checkpoint on master
-- pause the CommitTransaction right before persistent table cleanup after
-- notifyCommittedDtxTransaction()
select gp_inject_fault_infinite('onephase_transaction_commit', 'suspend', 1);
gp_inject_fault_infinite
--------------------------
Success:
(1 row)
-- trigger a 2PC, and it will block at commit;
2: checkpoint;
CHECKPOINT
2: begin;
BEGIN
2: drop table t_commit_transaction_block_checkpoint;
DROP
2&: commit; <waiting ...>
-- wait for the fault to trigger since following checkpoint could be faster
select gp_wait_until_triggered_fault('onephase_transaction_commit', 1, 1);
gp_wait_until_triggered_fault
-------------------------------
Success:
(1 row)
-- do checkpoint on master in utility mode, and it should block
-1U&: checkpoint; <waiting ...>
-- resume the 2PC
select gp_inject_fault('onephase_transaction_commit', 'reset', 1);
gp_inject_fault
-----------------
Success:
(1 row)
2<: <... completed>
COMMIT
-1U<: <... completed>
CHECKPOINT