mirror of https://github.com/citusdata/citus.git
Fail on alter instead
parent
34274fb8b8
commit
bf33d2a993
|
@ -32,12 +32,15 @@ INSERT INTO t SELECT x, x+1, MD5(random()::text) FROM generate_series(1,100000)
|
||||||
-- Initial shard placements
|
-- Initial shard placements
|
||||||
SELECT * FROM shards_in_workers;
|
SELECT * FROM shards_in_workers;
|
||||||
|
|
||||||
-- failure on creating the subscription
|
-- Failure on creating the subscription
|
||||||
SELECT citus.mitmproxy('conn.onQuery(query="CREATE SUBSCRIPTION").kill()');
|
-- Failing exactly on CREATE SUBSCRIPTION is causing flaky test where we fail with :
|
||||||
-- Log minimal messages to avoid printing the error message and make the test flaky
|
-- 1) ERROR: connection to the remote node localhost:xxxxx failed with the following error: ERROR: subscription "citus_shard_move_subscription_xxxxxxx" does not exist
|
||||||
SET client_min_messages TO ERROR;
|
-- another command is already in progress
|
||||||
|
-- 2) ERROR: connection to the remote node localhost:xxxxx failed with the following error: another command is already in progress
|
||||||
|
-- Instead fail on the next step (ALTER SUBSCRIPTION) instead which is also required logically as part of CREATE SUBSCRIPTION.
|
||||||
|
|
||||||
|
SELECT citus.mitmproxy('conn.onQuery(query="ALTER SUBSCRIPTION").kill()');
|
||||||
SELECT master_move_shard_placement(101, 'localhost', :worker_1_port, 'localhost', :worker_2_proxy_port);
|
SELECT master_move_shard_placement(101, 'localhost', :worker_1_port, 'localhost', :worker_2_proxy_port);
|
||||||
RESET client_min_messages;
|
|
||||||
|
|
||||||
-- Verify that the shard is not moved and the number of rows are still 100k
|
-- Verify that the shard is not moved and the number of rows are still 100k
|
||||||
SELECT * FROM shards_in_workers;
|
SELECT * FROM shards_in_workers;
|
||||||
|
|
Loading…
Reference in New Issue