From b08106b5cfce30b1c68fd4edea1e84b7bb837ce4 Mon Sep 17 00:00:00 2001 From: Murat Tuncer Date: Fri, 19 Oct 2018 11:41:13 +0300 Subject: [PATCH] Don't allow PG11 travis failures anymore We made PG11 builds optional when we had an issue with mx isolation test that we could not solve back then. This commit solves the issue with a workaround by running start_metadata_sync_to_node outside the transaction block. --- .travis.yml | 2 -- .../isolation_get_distributed_wait_queries.spec | 14 +++++++++++--- .../regress/specs/isolation_reference_on_mx.spec | 12 ++++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d03c2ca5..58a10d2ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,6 @@ matrix: - env: PGVERSION=9.6 - env: PGVERSION=10 - env: PGVERSION=11 - allow_failures: - - env: PGVERSION=11 before_install: - git clone -b v0.7.9 --depth 1 https://github.com/citusdata/tools.git - sudo make -C tools install diff --git a/src/test/regress/specs/isolation_get_distributed_wait_queries.spec b/src/test/regress/specs/isolation_get_distributed_wait_queries.spec index 150a76983..809b3f236 100644 --- a/src/test/regress/specs/isolation_get_distributed_wait_queries.spec +++ b/src/test/regress/specs/isolation_get_distributed_wait_queries.spec @@ -19,9 +19,17 @@ setup SELECT citus.replace_isolation_tester_func(); SELECT citus.refresh_isolation_tester_prepared_statement(); - - SELECT start_metadata_sync_to_node('localhost', 57637); - SELECT start_metadata_sync_to_node('localhost', 57638); + + -- start_metadata_sync_to_node can not be run inside a transaction block + -- following is a workaround to overcome that + -- port numbers are hard coded at the moment + SELECT master_run_on_worker( + ARRAY['localhost']::text[], + ARRAY[57636]::int[], + ARRAY[format('SELECT start_metadata_sync_to_node(''%s'', %s)', nodename, nodeport)]::text[], + false) + FROM pg_dist_node; + SET citus.shard_replication_factor TO 1; SET citus.replication_model to streaming; diff --git a/src/test/regress/specs/isolation_reference_on_mx.spec b/src/test/regress/specs/isolation_reference_on_mx.spec index 828f5de5f..df377429f 100644 --- a/src/test/regress/specs/isolation_reference_on_mx.spec +++ b/src/test/regress/specs/isolation_reference_on_mx.spec @@ -20,8 +20,16 @@ setup SELECT citus.replace_isolation_tester_func(); SELECT citus.refresh_isolation_tester_prepared_statement(); - SELECT start_metadata_sync_to_node('localhost', 57637); - SELECT start_metadata_sync_to_node('localhost', 57638); + -- start_metadata_sync_to_node can not be run inside a transaction block + -- following is a workaround to overcome that + -- port numbers are hard coded at the moment + SELECT master_run_on_worker( + ARRAY['localhost']::text[], + ARRAY[57636]::int[], + ARRAY[format('SELECT start_metadata_sync_to_node(''%s'', %s)', nodename, nodeport)]::text[], + false) + FROM pg_dist_node; + SET citus.replication_model to streaming; CREATE TABLE ref_table(user_id int, value_1 int);