mirror of https://github.com/citusdata/citus.git
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
parent
fdcb223cb7
commit
c603fd5d7a
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -160,7 +160,7 @@ SELECT * FROM nation_hash WHERE n_nationkey OPERATOR(===) 1;
|
|||
(1 row)
|
||||
|
||||
SELECT * FROM citus_mx_test_schema.nation_hash_collation_search_path ORDER BY 1;
|
||||
n_nationkey | n_name | n_regionkey | n_comment
|
||||
n_nationkey | n_name | n_regionkey | n_comment
|
||||
---------------------------------------------------------------------
|
||||
0 | ALGERIA | 0 | haggle. carefully final deposits detect slyly agai
|
||||
1 | ARGENTINA | 1 | al foxes promise slyly according to the regular accounts. bold requests alon
|
||||
|
@ -171,7 +171,7 @@ SELECT * FROM citus_mx_test_schema.nation_hash_collation_search_path ORDER BY 1;
|
|||
(6 rows)
|
||||
|
||||
SELECT n_comment FROM citus_mx_test_schema.nation_hash_collation_search_path ORDER BY n_comment COLLATE citus_mx_test_schema.english;
|
||||
n_comment
|
||||
n_comment
|
||||
---------------------------------------------------------------------
|
||||
al foxes promise slyly according to the regular accounts. bold requests alon
|
||||
eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
|
||||
|
@ -183,7 +183,7 @@ SELECT n_comment FROM citus_mx_test_schema.nation_hash_collation_search_path ORD
|
|||
|
||||
SET search_path TO citus_mx_test_schema;
|
||||
SELECT * FROM nation_hash_collation_search_path ORDER BY 1 DESC;
|
||||
n_nationkey | n_name | n_regionkey | n_comment
|
||||
n_nationkey | n_name | n_regionkey | n_comment
|
||||
---------------------------------------------------------------------
|
||||
5 | ETHIOPIA | 0 | ven packages wake quickly. regu
|
||||
4 | EGYPT | 4 | y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
|
||||
|
@ -194,7 +194,7 @@ SELECT * FROM nation_hash_collation_search_path ORDER BY 1 DESC;
|
|||
(6 rows)
|
||||
|
||||
SELECT n_comment FROM nation_hash_collation_search_path ORDER BY n_comment COLLATE english;
|
||||
n_comment
|
||||
n_comment
|
||||
---------------------------------------------------------------------
|
||||
al foxes promise slyly according to the regular accounts. bold requests alon
|
||||
eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue