Normalize tests: s/shard [0-9]+/shard xxxxx/g

pull/3336/head
Jelte Fennema 2020-01-03 11:44:08 +01:00
parent 8b5fe8aa17
commit 7b833466ba
19 changed files with 43 additions and 43 deletions

View File

@ -10,7 +10,7 @@
s/localhost:[0-9]+/localhost:xxxxx/g
s/ port=[0-9]+ / port=xxxxx /g
s/placement [0-9]+/placement xxxxx/g
#s/shard [0-9]+/shard xxxxx/g
s/shard [0-9]+/shard xxxxx/g
#s/assigned task [0-9]+ to node/assigned task to node/
#s/node group [12] (but|does)/node group \1/
#

View File

@ -151,7 +151,7 @@ SELECT citus.mitmproxy('conn.onCopyData().kill()');
(1 row)
COPY copy_test FROM PROGRAM 'echo 0, 0 && echo 1, 1 && echo 2, 4 && echo 3, 9' WITH CSV;
ERROR: failed to COPY to shard 100404 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT * FROM pg_dist_shard s, pg_dist_shard_placement p
WHERE (s.shardid = p.shardid) AND s.logicalrelid = 'copy_test'::regclass
ORDER BY placementid;

View File

@ -88,7 +88,7 @@ SELECT citus.mitmproxy('conn.onCopyData().killall()'); -- raw rows from the clie
(1 row)
COPY copy_test FROM PROGRAM 'echo 0, 0 && echo 1, 1 && echo 2, 4 && echo 3, 9' WITH CSV;
ERROR: failed to COPY to shard 100400 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
-- ==== kill the connection when the worker confirms it's received the data ====
-- the query should abort
SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY").killall()');
@ -98,7 +98,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY").killall()');
(1 row)
COPY copy_test FROM PROGRAM 'echo 0, 0 && echo 1, 1 && echo 2, 4 && echo 3, 9' WITH CSV;
ERROR: failed to COPY to shard 100400 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
-- ==== kill the connection when we try to send COMMIT ====
-- the query should succeed, and the placement should be marked inactive
SELECT citus.mitmproxy('conn.allow()');
@ -305,7 +305,7 @@ SELECT citus.mitmproxy('conn.onCopyData().killall()');
(1 row)
COPY copy_test FROM PROGRAM 'echo 0, 0 && echo 1, 1 && echo 2, 4 && echo 3, 9' WITH CSV;
ERROR: failed to COPY to shard 100400 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------
@ -334,7 +334,7 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
WARNING: could not commit transaction for shard 100400 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
@ -374,7 +374,7 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
WARNING: could not commit transaction for shard 100400 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
SELECT citus.mitmproxy('conn.allow()');
mitmproxy

View File

@ -69,7 +69,7 @@ SELECT citus.mitmproxy('conn.onCopyData().kill()');
(1 row)
\COPY test_table FROM stdin delimiter ',';
ERROR: failed to COPY to shard 1710000 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------
@ -124,7 +124,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY 1").kill()');
(1 row)
\COPY test_table FROM stdin delimiter ',';
ERROR: failed to COPY to shard 1710002 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------
@ -377,7 +377,7 @@ SELECT create_distributed_table('test_table_2','id');
(1 row)
-- When kill on copying data, it will be rollbacked and placements won't be labaled as invalid.
-- Note that now we sent data to shard 210007, yet it is not marked as invalid.
-- Note that now we sent data to shard xxxxx, yet it is not marked as invalid.
-- You can check the issue about this behaviour: https://github.com/citusdata/citus/issues/1933
SELECT citus.mitmproxy('conn.onCopyData().kill()');
mitmproxy
@ -386,7 +386,7 @@ SELECT citus.mitmproxy('conn.onCopyData().kill()');
(1 row)
\COPY test_table_2 FROM stdin delimiter ',';
ERROR: failed to COPY to shard 1710012 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------

View File

@ -178,7 +178,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="^COPY 3").kill()');
(1 row)
\copy test_table FROM STDIN DELIMITER ','
ERROR: failed to COPY to shard 130000 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------

View File

@ -227,7 +227,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY").kill()');
SELECT create_distributed_table('test_table', 'id');
NOTICE: Copying data from local table...
ERROR: failed to COPY to shard 11000016 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT count(*) FROM pg_dist_shard WHERE logicalrelid='create_distributed_table_non_empty_failure.test_table'::regclass;
count
-------
@ -762,7 +762,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY").kill()');
(1 row)
SELECT create_distributed_table('test_table', 'id');
ERROR: failed to COPY to shard 11000096 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT count(*) FROM pg_dist_shard WHERE logicalrelid='create_distributed_table_non_empty_failure.test_table'::regclass;
count
-------

View File

@ -110,7 +110,7 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="COPY 3").kill()');
SELECT create_reference_table('ref_table');
NOTICE: Copying data from local table...
ERROR: failed to COPY to shard 10000005 on localhost:xxxxx
ERROR: failed to COPY to shard xxxxx on localhost:xxxxx
SELECT count(*) FROM pg_dist_shard_placement;
count
-------

View File

@ -232,8 +232,8 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
WARNING: could not commit transaction for shard 100802 on any active node
WARNING: could not commit transaction for shard 100800 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------

View File

@ -108,7 +108,7 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
COMMIT;
ERROR: could not make changes to shard 100950 on any node
ERROR: could not make changes to shard xxxxx on any node
SELECT * FROM artists WHERE id IN (4, 5);
id | name
----+-----------------
@ -166,7 +166,7 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
COMMIT;
ERROR: could not make changes to shard 100950 on any node
ERROR: could not make changes to shard xxxxx on any node
SELECT * FROM artists WHERE id IN (4, 5);
id | name
----+-----------------
@ -217,7 +217,7 @@ WARNING: connection error: localhost:xxxxx
WARNING: connection not open
WARNING: connection not open
COMMIT;
ERROR: could not make changes to shard 100950 on any node
ERROR: could not make changes to shard xxxxx on any node
SELECT * FROM artists WHERE id=6;
id | name
----+------

View File

@ -293,8 +293,8 @@ CONTEXT: while executing command on localhost:xxxxx
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: connection not open
CONTEXT: while executing command on localhost:xxxxx
WARNING: could not commit transaction for shard 120002 on any active node
WARNING: could not commit transaction for shard 120000 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
-----------

View File

@ -859,7 +859,7 @@ ERROR: cannot colocate tables table1_groupb and table1_groupd
DETAIL: Shard counts don't match for table1_groupb and table1_groupd.
SELECT mark_tables_colocated('table1_groupB', ARRAY['table1_groupE']);
ERROR: cannot colocate tables table1_groupb and table1_groupe
DETAIL: Shard 1300026 of table1_groupb and shard 1300058 of table1_groupe have different number of shard placements.
DETAIL: Shard 1300026 of table1_groupb and shard xxxxx of table1_groupe have different number of shard placements.
SELECT mark_tables_colocated('table1_groupB', ARRAY['table1_groupF']);
ERROR: cannot colocate tables table1_groupb and table1_groupf
DETAIL: Replication models don't match for table1_groupb and table1_groupf.

View File

@ -104,7 +104,7 @@ SELECT load_shard_interval_array(540004, ''::text);
-- should see error for non-existent shard
SELECT load_shard_interval_array(540005, 0);
ERROR: could not find valid entry for shard 540005
ERROR: could not find valid entry for shard xxxxx
-- should see two placements
SELECT load_shard_placement_array(540001, false);
load_shard_placement_array

View File

@ -1834,11 +1834,11 @@ SET client_min_messages TO DEBUG2;
-- this should fail
INSERT INTO raw_events_first SELECT * FROM raw_events_second;
ERROR: cannot perform distributed planning for the given modification
DETAIL: Insert query cannot be executed on all placements for shard 13300000
DETAIL: Insert query cannot be executed on all placements for shard xxxxx
-- this should also fail
INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 5;
ERROR: cannot perform distributed planning for the given modification
DETAIL: Insert query cannot be executed on all placements for shard 13300000
DETAIL: Insert query cannot be executed on all placements for shard xxxxx
-- but this should work given that it hits different shard
INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 6;
DEBUG: Skipping target shard interval 13300000 since SELECT query for it pruned away

View File

@ -380,7 +380,7 @@ WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1200001 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
\unset VERBOSITY
-- verify everyhing including delete is rolled back
@ -666,8 +666,8 @@ WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1200002 on any active node
WARNING: could not commit transaction for shard 1200003 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
-- data should NOT be persisted
SELECT * FROM objects WHERE id = 1;
@ -705,7 +705,7 @@ INSERT INTO labs VALUES (9, 'BAD');
COMMIT;
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1200002 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
\set VERBOSITY default
-- data to objects should be persisted, but labs should not...
SELECT * FROM objects WHERE id = 1;

View File

@ -343,8 +343,8 @@ INSERT INTO labs_mx VALUES (9, 'Umbrella Corporation');
COMMIT;
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1220103 on any active node
WARNING: could not commit transaction for shard 1220102 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
-- data should NOT be persisted
SELECT * FROM objects_mx WHERE id = 2;
@ -371,8 +371,8 @@ INSERT INTO labs_mx VALUES (9, 'BAD');
COMMIT;
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1220103 on any active node
WARNING: could not commit transaction for shard 1220102 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
-- data should NOT be persisted
SELECT * FROM objects_mx WHERE id = 1;
@ -396,8 +396,8 @@ INSERT INTO labs_mx VALUES (9, 'BAD');
COMMIT;
WARNING: illegal value
WARNING: failed to commit transaction on localhost:xxxxx
WARNING: could not commit transaction for shard 1220103 on any active node
WARNING: could not commit transaction for shard 1220102 on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
WARNING: could not commit transaction for shard xxxxx on any active node
ERROR: could not commit transaction on any active node
-- no data should persists
SELECT * FROM objects_mx WHERE id = 1;

View File

@ -448,7 +448,7 @@ SELECT * FROM co_test_table ORDER BY id, col_1;
\c - - - :worker_1_port
SET search_path = 'multi_real_time_transaction';
-- shard 1610004 contains data from tenant id 1
-- shard xxxxx contains data from tenant id 1
SELECT * FROM co_test_table_1610004 ORDER BY id, col_1;
id | col_1 | col_2
----+-------+--------
@ -463,7 +463,7 @@ SELECT * FROM co_test_table_1610006 ORDER BY id, col_1;
\c - - - :worker_2_port
SET search_path = 'multi_real_time_transaction';
-- shard 1610005 contains data from tenant id 3
-- shard xxxxx contains data from tenant id 3
SELECT * FROM co_test_table_1610005 ORDER BY id, col_1;
id | col_1 | col_2
----+-------+--------
@ -472,7 +472,7 @@ SELECT * FROM co_test_table_1610005 ORDER BY id, col_1;
3 | 40 | 'cc10'
(3 rows)
-- shard 1610007 contains data from tenant id 2
-- shard xxxxx contains data from tenant id 2
SELECT * FROM co_test_table_1610007 ORDER BY id, col_1;
id | col_1 | col_2
----+-------+--------

View File

@ -70,7 +70,7 @@ SELECT create_reference_table('replicate_reference_table_unhealthy');
UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid = 1370000;
SELECT 1 FROM master_add_node('localhost', :worker_2_port);
ERROR: could not find any healthy placement for shard 1370000
ERROR: could not find any healthy placement for shard xxxxx
-- verify node is not added
SELECT COUNT(*) FROM pg_dist_node WHERE nodeport = :worker_2_port;
count

View File

@ -39,7 +39,7 @@ INSERT INTO pg_dist_shard (logicalrelid, shardid, shardstorage, shardminvalue, s
SELECT pg_class.oid, series.index, 'r', 1, 1000
FROM pg_class, generate_series(200, 202) AS series(index)
WHERE pg_class.relname = 'task_assignment_test_table';
-- Create shard placements for shard 200 and 201
-- Create shard placements for shard xxxxx and 201
INSERT INTO pg_dist_shard_placement (shardid, shardstate, shardlength, nodename, nodeport)
SELECT 200, 1, 1, nodename, nodeport
FROM pg_dist_shard_placement
@ -52,7 +52,7 @@ INSERT INTO pg_dist_shard_placement (shardid, shardstate, shardlength, nodename,
GROUP BY nodename, nodeport
ORDER BY nodename, nodeport ASC
LIMIT 2;
-- Create shard placements for shard 202
-- Create shard placements for shard xxxxx
INSERT INTO pg_dist_shard_placement (shardid, shardstate, shardlength, nodename, nodeport)
SELECT 202, 1, 1, nodename, nodeport
FROM pg_dist_shard_placement

View File

@ -83,7 +83,7 @@ UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_
UPDATE pg_dist_shard_placement SET shardstate = 3
WHERE shardid = (SELECT shardid FROM pg_dist_shard WHERE logicalrelid = 'upgrade_reference_table_unhealthy'::regclass::oid);
SELECT upgrade_to_reference_table('upgrade_reference_table_unhealthy');
ERROR: could not find any healthy placement for shard 1360006
ERROR: could not find any healthy placement for shard xxxxx
DROP TABLE upgrade_reference_table_unhealthy;
-- test with table containing composite type
CREATE TYPE upgrade_test_composite_type AS (key1 text, key2 text);