mirror of https://github.com/citusdata/citus.git
more tests
parent
a6a684ba3d
commit
be525ddb94
|
@ -181,4 +181,63 @@ SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, re
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
DROP DATABASE db1;
|
DROP DATABASE db1;
|
||||||
|
SELECT citus.mitmproxy('conn.onQuery(query="^SET").kill()');
|
||||||
|
mitmproxy
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
WARNING: Commands that are not transaction-safe may result in partial failure, potentially leading to an inconsistent state.
|
||||||
|
If the problematic command is a CREATE operation, consider using the 'IF EXISTS' syntax to drop the object,
|
||||||
|
if applicable, and then re-attempt the original command.
|
||||||
|
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: connection not open
|
||||||
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
|
mitmproxy
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CALL citus_cleanup_orphaned_resources();
|
||||||
|
SELECT bool_and(result::boolean) AS no_temp_databases_on_any_nodes FROM run_command_on_all_nodes($$SELECT COUNT(*)=0 FROM pg_database WHERE datname LIKE 'citus_temp_database_%'$$);
|
||||||
|
no_temp_databases_on_any_nodes
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, result;
|
||||||
|
node_type | result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
|
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
|
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT citus_internal.acquire_citus_advisory_object_class_lock").kill()');
|
||||||
|
mitmproxy
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: connection not open
|
||||||
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
|
mitmproxy
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CALL citus_cleanup_orphaned_resources();
|
||||||
|
SELECT bool_and(result::boolean) AS no_temp_databases_on_any_nodes FROM run_command_on_all_nodes($$SELECT COUNT(*)=0 FROM pg_database WHERE datname LIKE 'citus_temp_database_%'$$);
|
||||||
|
no_temp_databases_on_any_nodes
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, result;
|
||||||
|
node_type | result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
|
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
RESET client_min_messages;
|
RESET client_min_messages;
|
||||||
|
|
|
@ -52,4 +52,20 @@ SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, re
|
||||||
|
|
||||||
DROP DATABASE db1;
|
DROP DATABASE db1;
|
||||||
|
|
||||||
|
SELECT citus.mitmproxy('conn.onQuery(query="^SET").kill()');
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
|
|
||||||
|
CALL citus_cleanup_orphaned_resources();
|
||||||
|
SELECT bool_and(result::boolean) AS no_temp_databases_on_any_nodes FROM run_command_on_all_nodes($$SELECT COUNT(*)=0 FROM pg_database WHERE datname LIKE 'citus_temp_database_%'$$);
|
||||||
|
SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, result;
|
||||||
|
|
||||||
|
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT citus_internal.acquire_citus_advisory_object_class_lock").kill()');
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
|
|
||||||
|
CALL citus_cleanup_orphaned_resources();
|
||||||
|
SELECT bool_and(result::boolean) AS no_temp_databases_on_any_nodes FROM run_command_on_all_nodes($$SELECT COUNT(*)=0 FROM pg_database WHERE datname LIKE 'citus_temp_database_%'$$);
|
||||||
|
SELECT * FROM public.check_database_on_all_nodes($$db1$$) ORDER BY node_type, result;
|
||||||
|
|
||||||
RESET client_min_messages;
|
RESET client_min_messages;
|
||||||
|
|
Loading…
Reference in New Issue