mirror of https://github.com/citusdata/citus.git
Try to get flaky multi_tenant_isolation_nonblocking/citus_non_blocking_split_shards
parent
e95a84a7a5
commit
b9d56f15fa
|
@ -198,6 +198,10 @@ DEPS = {
|
||||||
["multi_create_table", "multi_create_users", "multi_multiuser_load_data"],
|
["multi_create_table", "multi_create_users", "multi_multiuser_load_data"],
|
||||||
repeatable=False,
|
repeatable=False,
|
||||||
),
|
),
|
||||||
|
"multi_tenant_isolation_nonblocking": TestDeps(
|
||||||
|
"minimal_schedule",
|
||||||
|
["multi_data_types"],
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -611,26 +611,29 @@ SELECT COUNT(*) FROM colocated_dist_table;
|
||||||
--BEGIN : Cleanup
|
--BEGIN : Cleanup
|
||||||
\c - postgres - :master_port
|
\c - postgres - :master_port
|
||||||
-- make sure we don't have any replication objects leftover on the workers
|
-- make sure we don't have any replication objects leftover on the workers
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_replication_slots$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||||
run_command_on_workers
|
result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(localhost,57637,t,0)
|
0
|
||||||
(localhost,57638,t,0)
|
0
|
||||||
(2 rows)
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_publication$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||||
run_command_on_workers
|
result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(localhost,57637,t,0)
|
0
|
||||||
(localhost,57638,t,0)
|
0
|
||||||
(2 rows)
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_subscription$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||||
run_command_on_workers
|
result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(localhost,57637,t,0)
|
0
|
||||||
(localhost,57638,t,0)
|
0
|
||||||
(2 rows)
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
|
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
|
||||||
SELECT pg_reload_conf();
|
SELECT pg_reload_conf();
|
||||||
|
|
|
@ -11,6 +11,13 @@ CREATE SCHEMA "Tenant Isolation";
|
||||||
SET search_path to "Tenant Isolation";
|
SET search_path to "Tenant Isolation";
|
||||||
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
||||||
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
||||||
|
\c - postgres - :master_port
|
||||||
|
SELECT 1 FROM master_remove_node('localhost', :master_port);
|
||||||
|
?column?
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
(1 row)
|
||||||
|
|
||||||
-- connect with this new role
|
-- connect with this new role
|
||||||
\c - mx_isolation_role_ent - :master_port
|
\c - mx_isolation_role_ent - :master_port
|
||||||
SET search_path to "Tenant Isolation";
|
SET search_path to "Tenant Isolation";
|
||||||
|
@ -1275,3 +1282,27 @@ SELECT count(*) FROM pg_catalog.pg_dist_partition WHERE colocationid > 0;
|
||||||
TRUNCATE TABLE pg_catalog.pg_dist_colocation;
|
TRUNCATE TABLE pg_catalog.pg_dist_colocation;
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 100;
|
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 100;
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
|
|
@ -311,9 +311,9 @@ SELECT COUNT(*) FROM colocated_dist_table;
|
||||||
--BEGIN : Cleanup
|
--BEGIN : Cleanup
|
||||||
\c - postgres - :master_port
|
\c - postgres - :master_port
|
||||||
-- make sure we don't have any replication objects leftover on the workers
|
-- make sure we don't have any replication objects leftover on the workers
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_replication_slots$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_publication$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||||
SELECT run_command_on_workers($$SELECT count(*) FROM pg_subscription$$);
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||||
|
|
||||||
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
|
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
|
||||||
SELECT pg_reload_conf();
|
SELECT pg_reload_conf();
|
||||||
|
|
|
@ -16,6 +16,9 @@ SET search_path to "Tenant Isolation";
|
||||||
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
||||||
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
||||||
|
|
||||||
|
\c - postgres - :master_port
|
||||||
|
SELECT 1 FROM master_remove_node('localhost', :master_port);
|
||||||
|
|
||||||
-- connect with this new role
|
-- connect with this new role
|
||||||
\c - mx_isolation_role_ent - :master_port
|
\c - mx_isolation_role_ent - :master_port
|
||||||
SET search_path to "Tenant Isolation";
|
SET search_path to "Tenant Isolation";
|
||||||
|
@ -607,3 +610,7 @@ TRUNCATE TABLE pg_catalog.pg_dist_colocation;
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 100;
|
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 100;
|
||||||
|
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
||||||
|
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||||
|
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||||
|
|
Loading…
Reference in New Issue