Update check-multi-mx tests for adaptive executor

Basically repartition joins are enabled where necessary. For parallel
tests max adaptive executor pool size is decresed to 2, otherwise we
would get too many clients error.
pull/3850/head
Sait Talha Nisanci 2020-05-19 11:27:11 +03:00
parent fdcb223cb7
commit c603fd5d7a
16 changed files with 42 additions and 14 deletions

View File

@ -1373,9 +1373,13 @@ BEGIN;
NOTICE: executing the command locally: DELETE FROM local_shard_execution.distributed_table_1470003 distributed_table WHERE (key OPERATOR(pg_catalog.=) 500)
SET LOCAL citus.task_executor_type = 'task-tracker';
SELECT count(*) FROM distributed_table;
ERROR: cannot execute command because a local execution has accessed a placement in the transaction
DETAIL: Some parallel commands cannot be executed if a previous command has already been executed locally
HINT: Try re-running the transaction with "SET LOCAL citus.enable_local_execution TO OFF;"
NOTICE: executing the command locally: SELECT count(*) AS count FROM local_shard_execution.distributed_table_1470001 distributed_table WHERE true
NOTICE: executing the command locally: SELECT count(*) AS count FROM local_shard_execution.distributed_table_1470003 distributed_table WHERE true
count
---------------------------------------------------------------------
100
(1 row)
ROLLBACK;
-- local execution should not be executed locally
-- becase a task-tracker query has already been executed
@ -1383,6 +1387,8 @@ BEGIN;
SET LOCAL citus.task_executor_type = 'task-tracker';
SET LOCAL client_min_messages TO INFO;
SELECT count(*) FROM distributed_table;
NOTICE: executing the command locally: SELECT count(*) AS count FROM local_shard_execution.distributed_table_1470001 distributed_table WHERE true
NOTICE: executing the command locally: SELECT count(*) AS count FROM local_shard_execution.distributed_table_1470003 distributed_table WHERE true
count
---------------------------------------------------------------------
101
@ -1390,6 +1396,7 @@ BEGIN;
SET LOCAL client_min_messages TO LOG;
DELETE FROM distributed_table WHERE key = 500;
NOTICE: executing the command locally: DELETE FROM local_shard_execution.distributed_table_1470003 distributed_table WHERE (key OPERATOR(pg_catalog.=) 500)
ROLLBACK;
-- probably not a realistic case since views are not very
-- well supported with MX

View File

@ -487,7 +487,7 @@ SET citus.explain_all_tasks TO off;
EXPLAIN (COSTS FALSE)
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030;
Aggregate
-> Custom Scan (Citus Task-Tracker)
-> Custom Scan (Citus Adaptive)
Task Count: 16
Tasks Shown: One of 16
-> Task
@ -503,7 +503,7 @@ EXPLAIN (COSTS FALSE)
AND o_custkey = c_custkey
AND l_suppkey = s_suppkey;
Aggregate
-> Custom Scan (Citus Task-Tracker)
-> Custom Scan (Citus Adaptive)
Task Count: 16
Tasks Shown: One of 16
-> Task
@ -539,7 +539,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
{
"Node Type": "Custom Scan",
"Parent Relationship": "Outer",
"Custom Plan Provider": "Citus Task-Tracker",
"Custom Plan Provider": "Citus Adaptive",
"Parallel Aware": false,
"Distributed Query": {
"Job": {
@ -675,7 +675,7 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
<Plan>
<Node-Type>Custom Scan</Node-Type>
<Parent-Relationship>Outer</Parent-Relationship>
<Custom-Plan-Provider>Citus Task-Tracker</Custom-Plan-Provider>
<Custom-Plan-Provider>Citus Adaptive</Custom-Plan-Provider>
<Parallel-Aware>false</Parallel-Aware>
<Distributed-Query>
<Job>
@ -807,7 +807,7 @@ EXPLAIN (COSTS FALSE, FORMAT YAML)
Plans:
- Node Type: "Custom Scan"
Parent Relationship: "Outer"
Custom Plan Provider: "Citus Task-Tracker"
Custom Plan Provider: "Citus Adaptive"
Parallel Aware: false
Distributed Query:
Job:

View File

@ -879,6 +879,7 @@ LOG: join order: [ "colocated_table_test" ][ reference join "reference_table_te
(2 rows)
SET citus.task_executor_type to "task-tracker";
SET citus.enable_repartition_joins to ON;
SELECT
colocated_table_test.value_2
FROM

View File

@ -4,6 +4,8 @@
-- tests use the same sequence ids but the queries should not fail.
\c - - - :worker_1_port
SET citus.task_executor_type TO "task-tracker";
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
CREATE TEMP TABLE t1 AS
SELECT
l1.l_comment

View File

@ -4,6 +4,8 @@
-- tests use the same sequence ids but the queries should not fail.
\c - - - :worker_2_port
SET citus.task_executor_type TO "task-tracker";
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
CREATE TEMP TABLE t1 AS
SELECT
l1.l_comment

View File

@ -153,6 +153,7 @@ INSERT INTO repartition_udt_other values (11, '(2,2)'::test_udt, 'foo');
INSERT INTO repartition_udt_other values (12, '(2,3)'::test_udt, 'foo');
SET client_min_messages = LOG;
SET citus.task_executor_type = 'task-tracker';
SET citus.enable_repartition_joins to ON;
-- Query that should result in a repartition
-- join on int column, and be empty.
SELECT * FROM repartition_udt JOIN repartition_udt_other
@ -170,7 +171,7 @@ SELECT * FROM repartition_udt JOIN repartition_udt_other
LOG: join order: [ "repartition_udt" ][ dual partition join "repartition_udt_other" ]
QUERY PLAN
---------------------------------------------------------------------
Custom Scan (Citus Task-Tracker)
Custom Scan (Citus Adaptive)
Task Count: 4
Tasks Shown: None, not supported for re-partition queries
-> MapMergeJob

View File

@ -5,6 +5,8 @@
SET client_min_messages = LOG;
-- Query that should result in a repartition join on UDT column.
SET citus.task_executor_type = 'task-tracker';
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
SET citus.log_multi_join_order = true;
-- Query that should result in a repartition
-- join on int column, and be empty

View File

@ -5,6 +5,8 @@
SET client_min_messages = LOG;
-- Query that should result in a repartition join on UDT column.
SET citus.task_executor_type = 'task-tracker';
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
SET citus.log_multi_join_order = true;
-- Query that should result in a repartition
-- join on int column, and be empty.

View File

@ -218,6 +218,7 @@ SELECT * FROM nation_hash_composite_types WHERE test_col = '(a,a)'::new_composit
0 | ALGERIA | 0 | haggle. carefully final deposits detect slyly agai | (a,a)
(1 row)
SET citus.enable_repartition_joins to ON;
-- check when search_path is public,
-- join of two tables which are in different schemas,
-- join on partition column

View File

@ -537,6 +537,7 @@ WHERE
ORDER BY 1;
SET citus.task_executor_type to "task-tracker";
SET citus.enable_repartition_joins to ON;
SELECT
colocated_table_test.value_2
FROM

View File

@ -5,6 +5,8 @@
\c - - - :worker_1_port
SET citus.task_executor_type TO "task-tracker";
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
CREATE TEMP TABLE t1 AS
SELECT
l1.l_comment

View File

@ -5,6 +5,8 @@
\c - - - :worker_2_port
SET citus.task_executor_type TO "task-tracker";
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
CREATE TEMP TABLE t1 AS
SELECT
l1.l_comment

View File

@ -183,6 +183,7 @@ INSERT INTO repartition_udt_other values (12, '(2,3)'::test_udt, 'foo');
SET client_min_messages = LOG;
SET citus.task_executor_type = 'task-tracker';
SET citus.enable_repartition_joins to ON;
-- Query that should result in a repartition
-- join on int column, and be empty.

View File

@ -6,6 +6,8 @@
SET client_min_messages = LOG;
-- Query that should result in a repartition join on UDT column.
SET citus.task_executor_type = 'task-tracker';
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
SET citus.log_multi_join_order = true;
-- Query that should result in a repartition

View File

@ -6,6 +6,8 @@
SET client_min_messages = LOG;
-- Query that should result in a repartition join on UDT column.
SET citus.task_executor_type = 'task-tracker';
SET citus.max_adaptive_executor_pool_size TO 2;
SET citus.enable_repartition_joins to ON;
SET citus.log_multi_join_order = true;
-- Query that should result in a repartition

View File

@ -101,7 +101,7 @@ SELECT * FROM citus_mx_test_schema.nation_hash_composite_types WHERE test_col =
SET search_path TO citus_mx_test_schema;
SELECT * FROM nation_hash_composite_types WHERE test_col = '(a,a)'::new_composite_type ORDER BY 1::int DESC;
SET citus.enable_repartition_joins to ON;
-- check when search_path is public,
-- join of two tables which are in different schemas,
-- join on partition column