mirror of https://github.com/citusdata/citus.git
Decrease min messages for normalization
parent
9ec9209fd9
commit
e33ba7da9e
|
@ -180,7 +180,7 @@ ALTER TABLE test_table DROP COLUMN new_column;
|
|||
-- but now kill just after the worker sends response to
|
||||
-- COMMIT command, so we'll have lots of warnings but the command
|
||||
-- should have been committed both on the distributed table and the placements
|
||||
SET client_min_messages TO WARNING;
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT citus.mitmproxy('conn.onCommandComplete(command="^COMMIT").kill()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
@ -188,23 +188,12 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="^COMMIT").kill()');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE test_table ADD COLUMN new_column INT;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT array_agg(name::text ORDER BY name::text) FROM public.table_attrs where relid = 'test_table'::regclass;
|
||||
array_agg
|
||||
---------------------------------------------------------------------
|
||||
|
|
|
@ -378,6 +378,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").kill()');
|
|||
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
BEGIN;
|
||||
DELETE FROM dml_test WHERE id = 1;
|
||||
DELETE FROM dml_test WHERE id = 2;
|
||||
|
@ -385,11 +386,7 @@ INSERT INTO dml_test VALUES (5, 'Epsilon');
|
|||
UPDATE dml_test SET name = 'alpha' WHERE id = 1;
|
||||
UPDATE dml_test SET name = 'gamma' WHERE id = 3;
|
||||
COMMIT;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
RESET client_min_messages;
|
||||
-- all changes should be committed because we injected
|
||||
-- the failure on the COMMIT time. And, we should not
|
||||
-- mark any placements as INVALID
|
||||
|
|
|
@ -10,6 +10,7 @@ SELECT citus.mitmproxy('conn.allow()');
|
|||
SET citus.shard_count = 2;
|
||||
SET citus.shard_replication_factor = 1; -- one shard per worker
|
||||
SET citus.next_shard_id TO 100950;
|
||||
SET client_min_messages TO ERROR;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 150;
|
||||
CREATE TABLE artists (
|
||||
id bigint NOT NULL,
|
||||
|
@ -36,13 +37,6 @@ SELECT citus.mitmproxy('conn.onQuery(query="^SAVEPOINT").kill()');
|
|||
BEGIN;
|
||||
INSERT INTO artists VALUES (5, 'Asher Lev');
|
||||
SAVEPOINT s1;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
ERROR: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
DELETE FROM artists WHERE id=4;
|
||||
|
@ -68,16 +62,6 @@ UPDATE artists SET name='a';
|
|||
SAVEPOINT s1;
|
||||
DELETE FROM artists WHERE id=4;
|
||||
RELEASE SAVEPOINT s1;
|
||||
WARNING: AbortSubTransaction while in COMMIT state
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: savepoint "savepoint_2" does not exist
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
ERROR: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
ROLLBACK;
|
||||
|
@ -99,10 +83,6 @@ INSERT INTO artists VALUES (5, 'Asher Lev');
|
|||
SAVEPOINT s1;
|
||||
DELETE FROM artists WHERE id=4;
|
||||
ROLLBACK TO SAVEPOINT s1;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
COMMIT;
|
||||
ERROR: failure on connection marked as essential: localhost:xxxxx
|
||||
SELECT * FROM artists WHERE id IN (4, 5);
|
||||
|
@ -125,14 +105,6 @@ RELEASE SAVEPOINT s1;
|
|||
SAVEPOINT s2;
|
||||
INSERT INTO artists VALUES (5, 'Jacob Kahn');
|
||||
RELEASE SAVEPOINT s2;
|
||||
WARNING: AbortSubTransaction while in COMMIT state
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
ERROR: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
COMMIT;
|
||||
|
@ -156,10 +128,6 @@ ROLLBACK TO SAVEPOINT s1;
|
|||
SAVEPOINT s2;
|
||||
DELETE FROM artists WHERE id=5;
|
||||
ROLLBACK TO SAVEPOINT s2;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
COMMIT;
|
||||
ERROR: failure on connection marked as essential: localhost:xxxxx
|
||||
SELECT * FROM artists WHERE id IN (4, 5);
|
||||
|
@ -205,12 +173,6 @@ INSERT INTO artists VALUES (6, 'John J. Audubon');
|
|||
INSERT INTO artists VALUES (7, 'Emily Carr');
|
||||
INSERT INTO artists VALUES (7, 'Emily Carr');
|
||||
ROLLBACK TO SAVEPOINT s1;
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
COMMIT;
|
||||
ERROR: failure on connection marked as essential: localhost:xxxxx
|
||||
SELECT * FROM artists WHERE id=6;
|
||||
|
@ -242,10 +204,6 @@ SELECT citus.mitmproxy('conn.onQuery(query="^SAVEPOINT").kill()');
|
|||
BEGIN;
|
||||
INSERT INTO researchers VALUES (7, 4, 'Jan Plaza');
|
||||
SAVEPOINT s1;
|
||||
WARNING: connection not open
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
ERROR: connection not open
|
||||
INSERT INTO researchers VALUES (8, 4, 'Alonzo Church');
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
|
@ -281,8 +239,6 @@ INSERT INTO researchers VALUES (7, 4, 'Jan Plaza');
|
|||
SAVEPOINT s1;
|
||||
INSERT INTO researchers VALUES (8, 4, 'Alonzo Church');
|
||||
ROLLBACK TO s1;
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
RELEASE SAVEPOINT s1;
|
||||
COMMIT;
|
||||
ERROR: failure on connection marked as essential: localhost:xxxxx
|
||||
|
@ -314,12 +270,6 @@ SAVEPOINT s1;
|
|||
INSERT INTO researchers VALUES (8, 4, 'Alonzo Church');
|
||||
ROLLBACK TO s1;
|
||||
RELEASE SAVEPOINT s1;
|
||||
WARNING: AbortSubTransaction while in COMMIT state
|
||||
WARNING: connection not open
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: savepoint "savepoint_3" does not exist
|
||||
ERROR: connection not open
|
||||
COMMIT;
|
||||
-- should see correct results from healthy placement and one bad placement
|
||||
|
@ -361,16 +311,11 @@ SELECT * FROM ref;
|
|||
(1 row)
|
||||
|
||||
ROLLBACK TO SAVEPOINT start;
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
SELECT * FROM ref;
|
||||
WARNING: connection not open
|
||||
WARNING: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
WARNING: connection not open
|
||||
WARNING: connection not open
|
||||
ERROR: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
END;
|
||||
-- clean up
|
||||
RESET client_min_messages;
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
|
|
@ -266,7 +266,7 @@ SELECT count(*) FROM test_table;
|
|||
-- refill the table
|
||||
TRUNCATE test_table;
|
||||
INSERT INTO test_table SELECT x,x FROM generate_series(1,20) as f(x);
|
||||
SET client_min_messages TO WARNING;
|
||||
SET client_min_messages TO ERROR;
|
||||
-- now kill just after the worker sends response to
|
||||
-- COMMIT command, so we'll have lots of warnings but the command
|
||||
-- should have been committed both on the distributed table and the placements
|
||||
|
@ -277,16 +277,6 @@ SELECT citus.mitmproxy('conn.onCommandComplete(command="^COMMIT").kill()');
|
|||
(1 row)
|
||||
|
||||
TRUNCATE test_table;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
@ -305,7 +295,6 @@ SELECT count(*) FROM test_table;
|
|||
0
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
INSERT INTO test_table SELECT x,x FROM generate_series(1,20) as f(x);
|
||||
-- now cancel just after the worker sends response to
|
||||
-- but Postgres doesn't accept interrupts during COMMIT and ROLLBACK
|
||||
|
|
|
@ -39,6 +39,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^ANALYZE").kill()');
|
|||
|
||||
ANALYZE vacuum_test;
|
||||
ERROR: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").kill()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
@ -46,11 +47,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").kill()');
|
|||
(1 row)
|
||||
|
||||
ANALYZE vacuum_test;
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
WARNING: failed to commit transaction on localhost:xxxxx
|
||||
WARNING: connection not open
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
RESET client_min_messages;
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
mitmproxy
|
||||
---------------------------------------------------------------------
|
||||
|
|
|
@ -89,13 +89,11 @@ ALTER TABLE test_table DROP COLUMN new_column;
|
|||
-- but now kill just after the worker sends response to
|
||||
-- COMMIT command, so we'll have lots of warnings but the command
|
||||
-- should have been committed both on the distributed table and the placements
|
||||
SET client_min_messages TO WARNING;
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT citus.mitmproxy('conn.onCommandComplete(command="^COMMIT").kill()');
|
||||
ALTER TABLE test_table ADD COLUMN new_column INT;
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
|
||||
SELECT array_agg(name::text ORDER BY name::text) FROM public.table_attrs where relid = 'test_table'::regclass;
|
||||
SELECT run_command_on_placements('test_table', $$SELECT array_agg(name::text ORDER BY name::text) FROM public.table_attrs where relid = '%s'::regclass;$$) ORDER BY 1;
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ COPY dml_test FROM STDIN WITH CSV;
|
|||
|
||||
-- fail at PREPARED COMMIT as we use 2PC
|
||||
SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").kill()');
|
||||
SET client_min_messages TO ERROR;
|
||||
|
||||
BEGIN;
|
||||
DELETE FROM dml_test WHERE id = 1;
|
||||
|
@ -221,6 +222,8 @@ UPDATE dml_test SET name = 'alpha' WHERE id = 1;
|
|||
UPDATE dml_test SET name = 'gamma' WHERE id = 3;
|
||||
COMMIT;
|
||||
|
||||
RESET client_min_messages;
|
||||
|
||||
-- all changes should be committed because we injected
|
||||
-- the failure on the COMMIT time. And, we should not
|
||||
-- mark any placements as INVALID
|
||||
|
|
|
@ -7,6 +7,7 @@ SELECT citus.mitmproxy('conn.allow()');
|
|||
SET citus.shard_count = 2;
|
||||
SET citus.shard_replication_factor = 1; -- one shard per worker
|
||||
SET citus.next_shard_id TO 100950;
|
||||
SET client_min_messages TO ERROR;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 150;
|
||||
|
||||
CREATE TABLE artists (
|
||||
|
@ -200,6 +201,7 @@ SELECT * FROM ref;
|
|||
END;
|
||||
|
||||
-- clean up
|
||||
RESET client_min_messages;
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
DROP TABLE artists;
|
||||
DROP TABLE researchers;
|
||||
|
|
|
@ -103,7 +103,7 @@ SELECT count(*) FROM test_table;
|
|||
TRUNCATE test_table;
|
||||
INSERT INTO test_table SELECT x,x FROM generate_series(1,20) as f(x);
|
||||
|
||||
SET client_min_messages TO WARNING;
|
||||
SET client_min_messages TO ERROR;
|
||||
-- now kill just after the worker sends response to
|
||||
-- COMMIT command, so we'll have lots of warnings but the command
|
||||
-- should have been committed both on the distributed table and the placements
|
||||
|
@ -112,7 +112,6 @@ TRUNCATE test_table;
|
|||
SELECT citus.mitmproxy('conn.allow()');
|
||||
SELECT * FROM unhealthy_shard_count;
|
||||
SELECT count(*) FROM test_table;
|
||||
SET client_min_messages TO ERROR;
|
||||
|
||||
INSERT INTO test_table SELECT x,x FROM generate_series(1,20) as f(x);
|
||||
|
||||
|
|
|
@ -20,8 +20,10 @@ VACUUM vacuum_test;
|
|||
SELECT citus.mitmproxy('conn.onQuery(query="^ANALYZE").kill()');
|
||||
ANALYZE vacuum_test;
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT citus.mitmproxy('conn.onQuery(query="^COMMIT").kill()');
|
||||
ANALYZE vacuum_test;
|
||||
RESET client_min_messages;
|
||||
|
||||
SELECT citus.mitmproxy('conn.allow()');
|
||||
SELECT recover_prepared_transactions();
|
||||
|
|
Loading…
Reference in New Issue