mirror of https://github.com/citusdata/citus.git
Enable MX for the remaining failure tests (#5606)
parent
3c834e6693
commit
8d1b188620
|
@ -872,6 +872,18 @@ SELECT count(*) FROM pg_dist_shard WHERE logicalrelid='create_distributed_table_
|
|||
4
|
||||
(1 row)
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT recover_prepared_transactions();
|
||||
recover_prepared_transactions
|
||||
---------------------------------------------------------------------
|
||||
2
|
||||
(1 row)
|
||||
|
||||
DROP TABLE test_table;
|
||||
CREATE TABLE test_table(id int, value_1 int);
|
||||
INSERT INTO test_table VALUES (1,1),(2,2),(3,3),(4,4);
|
||||
|
|
|
@ -289,6 +289,12 @@ SELECT citus.mitmproxy('conn.allow()');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT recover_prepared_transactions();
|
||||
recover_prepared_transactions
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM pg_dist_shard;
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
|
@ -421,7 +427,7 @@ COMMIT;
|
|||
SELECT recover_prepared_transactions();
|
||||
recover_prepared_transactions
|
||||
---------------------------------------------------------------------
|
||||
4
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
|
|
|
@ -12,6 +12,8 @@ SELECT citus.clear_network_traffic();
|
|||
|
||||
SET citus.shard_count = 2;
|
||||
SET citus.shard_replication_factor = 2;
|
||||
-- this test is designed such that no modification lock is acquired
|
||||
SET citus.allow_modifications_from_workers_to_replicated_tables TO false;
|
||||
CREATE TABLE select_test (key int, value text);
|
||||
SELECT create_distributed_table('select_test', 'key');
|
||||
create_distributed_table
|
||||
|
@ -60,6 +62,12 @@ ERROR: connection to the remote node localhost:xxxxx failed with the following
|
|||
This probably means the server terminated abnormally
|
||||
before or while processing the request.
|
||||
COMMIT;
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
TRUNCATE select_test;
|
||||
-- now the same tests with query cancellation
|
||||
-- put data in shard for which mitm node is first placement
|
||||
|
@ -96,6 +104,12 @@ WHERE shardid IN (
|
|||
1
|
||||
(1 row)
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
TRUNCATE select_test;
|
||||
-- cancel the second query
|
||||
-- error after second SELECT; txn should fail
|
||||
|
|
|
@ -16,12 +16,9 @@ test: failure_add_disable_node
|
|||
test: failure_copy_to_reference
|
||||
test: failure_copy_on_hash
|
||||
test: failure_create_reference_table
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: failure_create_distributed_table_non_empty
|
||||
test: failure_create_table
|
||||
test: failure_single_select
|
||||
test: turn_mx_on
|
||||
|
||||
test: failure_multi_shard_update_delete
|
||||
test: failure_cte_subquery
|
||||
|
|
|
@ -304,6 +304,10 @@ BEGIN;
|
|||
SELECT create_distributed_table('test_table', 'id');
|
||||
COMMIT;
|
||||
SELECT count(*) FROM pg_dist_shard WHERE logicalrelid='create_distributed_table_non_empty_failure.test_table'::regclass;
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
SELECT recover_prepared_transactions();
|
||||
|
||||
DROP TABLE test_table;
|
||||
CREATE TABLE test_table(id int, value_1 int);
|
||||
INSERT INTO test_table VALUES (1,1),(2,2),(3,3),(4,4);
|
||||
|
@ -314,7 +318,9 @@ SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").cancel(' || pg_backend_pi
|
|||
BEGIN;
|
||||
SELECT create_distributed_table('test_table', 'id');
|
||||
COMMIT;
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
|
||||
SELECT count(*) FROM pg_dist_shard WHERE logicalrelid='create_distributed_table_non_empty_failure.test_table'::regclass;
|
||||
DROP TABLE test_table;
|
||||
CREATE TABLE test_table(id int, value_1 int);
|
||||
|
|
|
@ -99,6 +99,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="PREPARE TRANSACTION").ki
|
|||
SELECT create_distributed_table('test_table','id',colocate_with=>'temp_table');
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
SELECT recover_prepared_transactions();
|
||||
SELECT count(*) FROM pg_dist_shard;
|
||||
SELECT run_command_on_workers($$SELECT count(*) FROM information_schema.tables WHERE table_schema = 'failure_create_table' and table_name LIKE 'test_table%' ORDER BY 1$$);
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ SELECT citus.clear_network_traffic();
|
|||
SET citus.shard_count = 2;
|
||||
SET citus.shard_replication_factor = 2;
|
||||
|
||||
-- this test is designed such that no modification lock is acquired
|
||||
SET citus.allow_modifications_from_workers_to_replicated_tables TO false;
|
||||
|
||||
CREATE TABLE select_test (key int, value text);
|
||||
SELECT create_distributed_table('select_test', 'key');
|
||||
|
||||
|
@ -23,6 +26,8 @@ INSERT INTO select_test VALUES (3, 'more data');
|
|||
SELECT * FROM select_test WHERE key = 3;
|
||||
COMMIT;
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
|
||||
TRUNCATE select_test;
|
||||
|
||||
-- now the same tests with query cancellation
|
||||
|
@ -47,6 +52,8 @@ SELECT DISTINCT shardstate FROM pg_dist_shard_placement
|
|||
WHERE shardid IN (
|
||||
SELECT shardid FROM pg_dist_shard WHERE logicalrelid = 'select_test'::regclass
|
||||
);
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
TRUNCATE select_test;
|
||||
|
||||
-- cancel the second query
|
||||
|
|
Loading…
Reference in New Issue