mirror of https://github.com/citusdata/citus.git
Show that no metadata is sent when disabled
parent
7157152f6c
commit
89c1ccb7a5
|
@ -1190,6 +1190,52 @@ WHERE logicalrelid = 'test_dist_non_colocated'::regclass GROUP BY nodeport ORDER
|
|||
|
||||
SELECT * from master_set_node_property('localhost', :worker_2_port, 'bogusproperty', false);
|
||||
ERROR: only the 'shouldhaveshards' property can be set using this function
|
||||
SELECT nextval('pg_catalog.pg_dist_groupid_seq') AS last_group_id_cls \gset
|
||||
SELECT nextval('pg_catalog.pg_dist_node_nodeid_seq') AS last_node_id_cls \gset
|
||||
BEGIN;
|
||||
-- show that we do not send any metadata to any nodes if not enabled
|
||||
SET LOCAL citus.log_remote_commands TO ON;
|
||||
SET LOCAL citus.grep_remote_commands TO '%pg_dist%';
|
||||
SET citus.enable_metadata_sync TO OFF;
|
||||
SELECT start_metadata_sync_to_all_nodes();
|
||||
start_metadata_sync_to_all_nodes
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
DROP TABLE test_dist, test_ref, test_dist_colocated, test_dist_non_colocated;
|
||||
SELECT 1 FROM citus_remove_node('localhost', :worker_1_port);
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT 1 FROM citus_remove_node('localhost', :worker_2_port);
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT 1 FROM citus_add_node('localhost', :worker_1_port);
|
||||
NOTICE: issuing SELECT metadata ->> 'server_id' AS server_id FROM pg_dist_node_metadata
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT 1 FROM citus_add_node('localhost', :worker_2_port);
|
||||
NOTICE: issuing SELECT metadata ->> 'server_id' AS server_id FROM pg_dist_node_metadata
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
ROLLBACK;
|
||||
-- keep the rest of the tests inact that depends node/group ids
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART :last_group_id_cls;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART :last_node_id_cls;
|
||||
DROP TABLE test_dist, test_ref, test_dist_colocated, test_dist_non_colocated;
|
||||
BEGIN;
|
||||
SELECT start_metadata_sync_to_all_nodes();
|
||||
|
|
|
@ -482,6 +482,26 @@ WHERE logicalrelid = 'test_dist_non_colocated'::regclass GROUP BY nodeport ORDER
|
|||
|
||||
SELECT * from master_set_node_property('localhost', :worker_2_port, 'bogusproperty', false);
|
||||
|
||||
SELECT nextval('pg_catalog.pg_dist_groupid_seq') AS last_group_id_cls \gset
|
||||
SELECT nextval('pg_catalog.pg_dist_node_nodeid_seq') AS last_node_id_cls \gset
|
||||
|
||||
BEGIN;
|
||||
-- show that we do not send any metadata to any nodes if not enabled
|
||||
SET LOCAL citus.log_remote_commands TO ON;
|
||||
SET LOCAL citus.grep_remote_commands TO '%pg_dist%';
|
||||
SET citus.enable_metadata_sync TO OFF;
|
||||
SELECT start_metadata_sync_to_all_nodes();
|
||||
DROP TABLE test_dist, test_ref, test_dist_colocated, test_dist_non_colocated;
|
||||
SELECT 1 FROM citus_remove_node('localhost', :worker_1_port);
|
||||
SELECT 1 FROM citus_remove_node('localhost', :worker_2_port);
|
||||
SELECT 1 FROM citus_add_node('localhost', :worker_1_port);
|
||||
SELECT 1 FROM citus_add_node('localhost', :worker_2_port);
|
||||
ROLLBACK;
|
||||
|
||||
-- keep the rest of the tests inact that depends node/group ids
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART :last_group_id_cls;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART :last_node_id_cls;
|
||||
|
||||
DROP TABLE test_dist, test_ref, test_dist_colocated, test_dist_non_colocated;
|
||||
|
||||
BEGIN;
|
||||
|
|
Loading…
Reference in New Issue