mirror of https://github.com/citusdata/citus.git
207 lines
4.6 KiB
Plaintext
207 lines
4.6 KiB
Plaintext
Parsed test spec with 2 sessions
|
|
|
|
starting permutation: s1-add-second-node s1-begin s2-begin s2-create-distributed-table s1-noshards s2-commit s1-commit s2-shardcounts
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-add-second-node:
|
|
SELECT 1 FROM master_add_node('localhost', 57638);
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-begin:
|
|
BEGIN;
|
|
|
|
step s2-begin:
|
|
BEGIN;
|
|
|
|
step s2-create-distributed-table:
|
|
CREATE TABLE t1 (a int);
|
|
-- session needs to have replication factor set to 1, can't do in setup
|
|
SET citus.shard_replication_factor TO 1;
|
|
SELECT create_distributed_table('t1', 'a');
|
|
|
|
create_distributed_table
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-noshards:
|
|
SELECT * from master_set_node_property('localhost', 57637, 'shouldhaveshards', false);
|
|
<waiting ...>
|
|
step s2-commit:
|
|
COMMIT;
|
|
|
|
step s1-noshards: <... completed>
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s2-shardcounts:
|
|
SELECT nodeport, count(*)
|
|
FROM pg_dist_shard JOIN pg_dist_shard_placement USING (shardid)
|
|
WHERE logicalrelid = 't1'::regclass GROUP BY nodeport ORDER BY nodeport;
|
|
|
|
nodeport|count
|
|
---------------------------------------------------------------------
|
|
57637| 2
|
|
57638| 2
|
|
(2 rows)
|
|
|
|
master_remove_node
|
|
---------------------------------------------------------------------
|
|
|
|
|
|
(2 rows)
|
|
|
|
|
|
starting permutation: s1-add-second-node s1-begin s2-begin s1-noshards s2-create-distributed-table s1-commit s2-commit s2-shardcounts
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-add-second-node:
|
|
SELECT 1 FROM master_add_node('localhost', 57638);
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-begin:
|
|
BEGIN;
|
|
|
|
step s2-begin:
|
|
BEGIN;
|
|
|
|
step s1-noshards:
|
|
SELECT * from master_set_node_property('localhost', 57637, 'shouldhaveshards', false);
|
|
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-create-distributed-table:
|
|
CREATE TABLE t1 (a int);
|
|
-- session needs to have replication factor set to 1, can't do in setup
|
|
SET citus.shard_replication_factor TO 1;
|
|
SELECT create_distributed_table('t1', 'a');
|
|
<waiting ...>
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s2-create-distributed-table: <... completed>
|
|
create_distributed_table
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-commit:
|
|
COMMIT;
|
|
|
|
step s2-shardcounts:
|
|
SELECT nodeport, count(*)
|
|
FROM pg_dist_shard JOIN pg_dist_shard_placement USING (shardid)
|
|
WHERE logicalrelid = 't1'::regclass GROUP BY nodeport ORDER BY nodeport;
|
|
|
|
nodeport|count
|
|
---------------------------------------------------------------------
|
|
57638| 4
|
|
(1 row)
|
|
|
|
master_remove_node
|
|
---------------------------------------------------------------------
|
|
|
|
|
|
(2 rows)
|
|
|
|
|
|
starting permutation: s1-begin s2-begin s1-noshards s2-update-node s1-commit s2-commit
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-begin:
|
|
BEGIN;
|
|
|
|
step s2-begin:
|
|
BEGIN;
|
|
|
|
step s1-noshards:
|
|
SELECT * from master_set_node_property('localhost', 57637, 'shouldhaveshards', false);
|
|
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-update-node:
|
|
select * from master_update_node((select nodeid from pg_dist_node where nodeport = 57637), 'localhost', 57638)
|
|
<waiting ...>
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s2-update-node: <... completed>
|
|
master_update_node
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-commit:
|
|
COMMIT;
|
|
|
|
master_remove_node
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
|
|
starting permutation: s1-begin s2-begin s2-update-node s1-noshards s2-commit s1-commit
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-begin:
|
|
BEGIN;
|
|
|
|
step s2-begin:
|
|
BEGIN;
|
|
|
|
step s2-update-node:
|
|
select * from master_update_node((select nodeid from pg_dist_node where nodeport = 57637), 'localhost', 57638)
|
|
|
|
master_update_node
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-noshards:
|
|
SELECT * from master_set_node_property('localhost', 57637, 'shouldhaveshards', false);
|
|
<waiting ...>
|
|
step s2-commit:
|
|
COMMIT;
|
|
|
|
step s1-noshards: <... completed>
|
|
ERROR: node at "localhost:xxxxx" does not exist
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
master_remove_node
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|