mirror of https://github.com/citusdata/citus.git
Improve regression tests for multi_colocated_shard_transfer
Ensure that regression tests outputs are consistent for multi_colocated_shard_transfer.pull/1018/head
parent
9f0bd4cb36
commit
2276e99347
|
@ -16,23 +16,23 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300000 | table1_group1 | 57637 | 1000 | 1
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300001 | table1_group1 | 57637 | 1000 | 1
|
||||
1300001 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57637 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300003 | table1_group1 | 57637 | 1000 | 1
|
||||
1300003 | table1_group1 | 57638 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300004 | table2_group1 | 57637 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300005 | table2_group1 | 57637 | 1000 | 1
|
||||
1300005 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57637 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300007 | table2_group1 | 57637 | 1000 | 1
|
||||
1300007 | table2_group1 | 57638 | 1000 | 1
|
||||
(16 rows)
|
||||
|
@ -52,23 +52,23 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300000 | table1_group1 | 57638 | 1000 | 1
|
||||
1300000 | table1_group1 | 57637 | 1000 | 1
|
||||
1300000 | table1_group1 | 57638 | 1000 | 1
|
||||
1300001 | table1_group1 | 57637 | 1000 | 1
|
||||
1300001 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57637 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300003 | table1_group1 | 57637 | 1000 | 1
|
||||
1300003 | table1_group1 | 57638 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300004 | table2_group1 | 57637 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300005 | table2_group1 | 57637 | 1000 | 1
|
||||
1300005 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57637 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300007 | table2_group1 | 57637 | 1000 | 1
|
||||
1300007 | table2_group1 | 57638 | 1000 | 1
|
||||
(16 rows)
|
||||
|
@ -82,7 +82,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table5_groupX'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300016 | table5_groupx | 57637 | 0 | 1
|
||||
|
@ -91,8 +91,8 @@ ORDER BY s.shardid;
|
|||
1300017 | table5_groupx | 57638 | 0 | 1
|
||||
1300018 | table5_groupx | 57637 | 0 | 1
|
||||
1300018 | table5_groupx | 57638 | 0 | 1
|
||||
1300019 | table5_groupx | 57638 | 0 | 1
|
||||
1300019 | table5_groupx | 57637 | 0 | 1
|
||||
1300019 | table5_groupx | 57638 | 0 | 1
|
||||
(8 rows)
|
||||
|
||||
-- repair NOT colocated shard
|
||||
|
@ -110,7 +110,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table5_groupX'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300016 | table5_groupx | 57637 | 0 | 1
|
||||
|
@ -119,8 +119,8 @@ ORDER BY s.shardid;
|
|||
1300017 | table5_groupx | 57638 | 0 | 1
|
||||
1300018 | table5_groupx | 57637 | 0 | 1
|
||||
1300018 | table5_groupx | 57638 | 0 | 1
|
||||
1300019 | table5_groupx | 57638 | 0 | 1
|
||||
1300019 | table5_groupx | 57637 | 0 | 1
|
||||
1300019 | table5_groupx | 57638 | 0 | 1
|
||||
(8 rows)
|
||||
|
||||
-- test repairing shard in append distributed table
|
||||
|
@ -132,7 +132,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table6_append'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300020 | table6_append | 57637 | 0 | 1
|
||||
|
@ -156,7 +156,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table6_append'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300020 | table6_append | 57637 | 0 | 1
|
||||
|
@ -176,23 +176,23 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300000 | table1_group1 | 57637 | 1000 | 3
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300001 | table1_group1 | 57637 | 1000 | 1
|
||||
1300001 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57637 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300003 | table1_group1 | 57637 | 1000 | 1
|
||||
1300003 | table1_group1 | 57638 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300004 | table2_group1 | 57637 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300005 | table2_group1 | 57637 | 1000 | 1
|
||||
1300005 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57637 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300007 | table2_group1 | 57637 | 1000 | 1
|
||||
1300007 | table2_group1 | 57638 | 1000 | 1
|
||||
(16 rows)
|
||||
|
@ -208,23 +208,23 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
shardid | logicalrelid | nodeport | colocationid | shardstate
|
||||
---------+---------------+----------+--------------+------------
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300000 | table1_group1 | 57637 | 1000 | 3
|
||||
1300000 | table1_group1 | 57638 | 1000 | 3
|
||||
1300001 | table1_group1 | 57637 | 1000 | 1
|
||||
1300001 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300002 | table1_group1 | 57637 | 1000 | 1
|
||||
1300002 | table1_group1 | 57638 | 1000 | 1
|
||||
1300003 | table1_group1 | 57637 | 1000 | 1
|
||||
1300003 | table1_group1 | 57638 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300004 | table2_group1 | 57637 | 1000 | 1
|
||||
1300004 | table2_group1 | 57638 | 1000 | 3
|
||||
1300005 | table2_group1 | 57637 | 1000 | 1
|
||||
1300005 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300006 | table2_group1 | 57637 | 1000 | 1
|
||||
1300006 | table2_group1 | 57638 | 1000 | 1
|
||||
1300007 | table2_group1 | 57637 | 1000 | 1
|
||||
1300007 | table2_group1 | 57638 | 1000 | 1
|
||||
(16 rows)
|
||||
|
|
|
@ -20,7 +20,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
-- repair colocated shards
|
||||
SELECT master_copy_shard_placement(1300000, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
|
@ -33,7 +33,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
|
||||
-- test repairing NOT colocated shard
|
||||
|
@ -45,7 +45,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table5_groupX'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
-- repair NOT colocated shard
|
||||
SELECT master_copy_shard_placement(1300016, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
|
@ -58,7 +58,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table5_groupX'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
|
||||
-- test repairing shard in append distributed table
|
||||
|
@ -70,7 +70,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table6_append'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
-- repair shard in append distributed table
|
||||
SELECT master_copy_shard_placement(1300020, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
|
@ -83,7 +83,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
p.logicalrelid = 'table6_append'::regclass
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
|
||||
-- test repair while all placements of one shard in colocation group is unhealthy
|
||||
|
@ -98,7 +98,7 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
||||
-- repair while all placements of one shard in colocation group is unhealthy
|
||||
SELECT master_copy_shard_placement(1300000, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
|
@ -111,4 +111,4 @@ WHERE
|
|||
p.logicalrelid = s.logicalrelid AND
|
||||
s.shardid = sp.shardid AND
|
||||
colocationid = (SELECT colocationid FROM pg_dist_partition WHERE logicalrelid = 'table1_group1'::regclass)
|
||||
ORDER BY s.shardid;
|
||||
ORDER BY s.shardid, sp.nodeport;
|
||||
|
|
Loading…
Reference in New Issue