mirror of https://github.com/citusdata/citus.git
Fix failure test
parent
b7f3e1e766
commit
2789d45e9a
|
@ -42,7 +42,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET grou
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
ERROR: canceling statement due to user request
|
ERROR: canceling statement due to user request
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET groupid").kill()');
|
SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET groupid").kill()');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
|
@ -50,7 +50,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET grou
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
ERROR: server closed the connection unexpectedly
|
ERROR: server closed the connection unexpectedly
|
||||||
This probably means the server terminated abnormally
|
This probably means the server terminated abnormally
|
||||||
before or while processing the request.
|
before or while processing the request.
|
||||||
|
@ -62,7 +62,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_tabl
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
ERROR: canceling statement due to user request
|
ERROR: canceling statement due to user request
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").kill()');
|
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").kill()');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
|
@ -70,7 +70,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_tabl
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
ERROR: server closed the connection unexpectedly
|
ERROR: server closed the connection unexpectedly
|
||||||
This probably means the server terminated abnormally
|
This probably means the server terminated abnormally
|
||||||
before or while processing the request.
|
before or while processing the request.
|
||||||
|
@ -122,17 +122,17 @@ SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Verify we can sync metadata after unsuccessful attempts
|
-- Verify we can activate node after unsuccessful attempts
|
||||||
SELECT citus.mitmproxy('conn.allow()');
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
start_metadata_sync_to_node
|
citus_activate_node
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
4
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
|
@ -224,59 +224,6 @@ CONTEXT: while executing command on localhost:xxxxx
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Failure to drop all tables in pg_dist_partition
|
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").cancel(' || :pid || ')');
|
|
||||||
mitmproxy
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
|
||||||
NOTICE: dropping metadata on the node (localhost,9060)
|
|
||||||
ERROR: canceling statement due to user request
|
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").kill()');
|
|
||||||
mitmproxy
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
|
||||||
NOTICE: dropping metadata on the node (localhost,9060)
|
|
||||||
WARNING: server closed the connection unexpectedly
|
|
||||||
This probably means the server terminated abnormally
|
|
||||||
before or while processing the request.
|
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
|
||||||
WARNING: server closed the connection unexpectedly
|
|
||||||
This probably means the server terminated abnormally
|
|
||||||
before or while processing the request.
|
|
||||||
connection not open
|
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
|
||||||
WARNING: server closed the connection unexpectedly
|
|
||||||
This probably means the server terminated abnormally
|
|
||||||
before or while processing the request.
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
|
||||||
WARNING: server closed the connection unexpectedly
|
|
||||||
This probably means the server terminated abnormally
|
|
||||||
before or while processing the request.
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
|
||||||
WARNING: server closed the connection unexpectedly
|
|
||||||
This probably means the server terminated abnormally
|
|
||||||
before or while processing the request.
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
connection not open
|
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
|
||||||
stop_metadata_sync_to_node
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
-- Failure to truncate pg_dist_node in the worker
|
-- Failure to truncate pg_dist_node in the worker
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
|
@ -344,7 +291,7 @@ SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Verify we can drop metadata after unsuccessful attempts
|
-- Verify we can stop metadata sync after unsuccessful attempts
|
||||||
SELECT citus.mitmproxy('conn.allow()');
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
mitmproxy
|
mitmproxy
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
|
@ -32,20 +32,20 @@ SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
-- Failure to truncate pg_dist_node in the worker
|
-- Failure to truncate pg_dist_node in the worker
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").kill()');
|
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").kill()');
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
-- Failure to populate pg_dist_node in the worker
|
-- Failure to populate pg_dist_node in the worker
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^INSERT INTO pg_dist_node").cancel(' || :pid || ')');
|
SELECT citus.mitmproxy('conn.onQuery(query="^INSERT INTO pg_dist_node").cancel(' || :pid || ')');
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^INSERT INTO pg_dist_node").kill()');
|
SELECT citus.mitmproxy('conn.onQuery(query="^INSERT INTO pg_dist_node").kill()');
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
-- Verify that coordinator knows worker does not have valid metadata
|
-- Verify that coordinator knows worker does not have valid metadata
|
||||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
|
|
||||||
-- Verify we can sync metadata after unsuccessful attempts
|
-- Verify we can activate node after unsuccessful attempts
|
||||||
SELECT citus.mitmproxy('conn.allow()');
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
||||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
|
@ -70,12 +70,6 @@ SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET groupid").kill()');
|
SELECT citus.mitmproxy('conn.onQuery(query="^UPDATE pg_dist_local_group SET groupid").kill()');
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
-- Failure to drop all tables in pg_dist_partition
|
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").cancel(' || :pid || ')');
|
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^SELECT worker_drop_distributed_table").kill()');
|
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
|
||||||
|
|
||||||
-- Failure to truncate pg_dist_node in the worker
|
-- Failure to truncate pg_dist_node in the worker
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
SELECT citus.mitmproxy('conn.onQuery(query="^TRUNCATE pg_dist_node CASCADE").cancel(' || :pid || ')');
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
@ -87,7 +81,7 @@ SELECT count(*) FROM pg_dist_node;
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
-- Verify we can drop metadata after unsuccessful attempts
|
-- Verify we can stop metadata sync after unsuccessful attempts
|
||||||
SELECT citus.mitmproxy('conn.allow()');
|
SELECT citus.mitmproxy('conn.allow()');
|
||||||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
SELECT stop_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
|
@ -98,7 +92,7 @@ SELECT count(*) FROM pg_dist_node;
|
||||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_proxy_port;
|
||||||
|
|
||||||
-- turn metadata sync back on
|
-- turn metadata sync back on
|
||||||
SELECT citus_activate_node('localhost', :worker_2_proxy_port);
|
SELECT start_metadata_sync_to_node('localhost', :worker_2_proxy_port);
|
||||||
|
|
||||||
SET SEARCH_PATH = mx_metadata_sync;
|
SET SEARCH_PATH = mx_metadata_sync;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
Loading…
Reference in New Issue