-- -- MULTI_LARGE_TABLE_TASK_ASSIGNMENT -- -- Tests which cover task assignment for MapMerge jobs for single range repartition -- and dual hash repartition joins. The tests also cover task assignment propagation -- from a sql task to its depended tasks. Note that we set the executor type to task -- tracker executor here, as we cannot run repartition jobs with real time executor. ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000; -- print major version to make version-specific tests clear SHOW server_version \gset SELECT substring(:'server_version', '\d+') AS major_version; major_version --------------- 10 (1 row) BEGIN; SET client_min_messages TO DEBUG3; SET citus.large_table_shard_count TO 2; SET citus.task_executor_type TO 'task-tracker'; -- Single range repartition join to test anchor-shard based task assignment and -- assignment propagation to merge and data-fetch tasks. SELECT count(*) FROM orders, customer WHERE o_custkey = c_custkey; DEBUG: assigned task 4 to node localhost:57637 DEBUG: assigned task 2 to node localhost:57638 DEBUG: join prunable for intervals [1,1000] and [1001,2000] DEBUG: join prunable for intervals [1,1000] and [6001,7000] DEBUG: join prunable for intervals [1001,2000] and [1,1000] DEBUG: join prunable for intervals [1001,2000] and [6001,7000] DEBUG: join prunable for intervals [6001,7000] and [1,1000] DEBUG: join prunable for intervals [6001,7000] and [1001,2000] DEBUG: pruning merge fetch taskId 1 DETAIL: Creating dependency on merge taskId 5 DEBUG: pruning merge fetch taskId 4 DETAIL: Creating dependency on merge taskId 8 DEBUG: pruning merge fetch taskId 7 DETAIL: Creating dependency on merge taskId 11 DEBUG: assigned task 6 to node localhost:57637 DEBUG: assigned task 9 to node localhost:57638 DEBUG: assigned task 3 to node localhost:57637 count ------- 2984 (1 row) -- Single range repartition join, along with a join with a small table containing -- more than one shard. This situation results in multiple sql tasks depending on -- the same merge task, and tests our constraint group creation and assignment -- propagation. Here 'orders' is considered the small table. SET citus.large_table_shard_count TO 3; SELECT count(*) FROM orders, customer, lineitem WHERE o_custkey = c_custkey AND o_orderkey = l_orderkey; DEBUG: assigned task 9 to node localhost:57637 DEBUG: assigned task 15 to node localhost:57638 DEBUG: assigned task 12 to node localhost:57637 DEBUG: assigned task 18 to node localhost:57638 DEBUG: assigned task 3 to node localhost:57637 DEBUG: assigned task 6 to node localhost:57638 DEBUG: join prunable for intervals [1,1509] and [2951,4455] DEBUG: join prunable for intervals [1,1509] and [4480,5986] DEBUG: join prunable for intervals [1,1509] and [8997,10560] DEBUG: join prunable for intervals [1,1509] and [10560,12036] DEBUG: join prunable for intervals [1,1509] and [12036,13473] DEBUG: join prunable for intervals [1,1509] and [13473,14947] DEBUG: join prunable for intervals [1509,4964] and [8997,10560] DEBUG: join prunable for intervals [1509,4964] and [10560,12036] DEBUG: join prunable for intervals [1509,4964] and [12036,13473] DEBUG: join prunable for intervals [1509,4964] and [13473,14947] DEBUG: join prunable for intervals [2951,4455] and [1,1509] DEBUG: join prunable for intervals [2951,4455] and [4480,5986] DEBUG: join prunable for intervals [2951,4455] and [8997,10560] DEBUG: join prunable for intervals [2951,4455] and [10560,12036] DEBUG: join prunable for intervals [2951,4455] and [12036,13473] DEBUG: join prunable for intervals [2951,4455] and [13473,14947] DEBUG: join prunable for intervals [4480,5986] and [1,1509] DEBUG: join prunable for intervals [4480,5986] and [2951,4455] DEBUG: join prunable for intervals [4480,5986] and [8997,10560] DEBUG: join prunable for intervals [4480,5986] and [10560,12036] DEBUG: join prunable for intervals [4480,5986] and [12036,13473] DEBUG: join prunable for intervals [4480,5986] and [13473,14947] DEBUG: join prunable for intervals [8997,10560] and [1,1509] DEBUG: join prunable for intervals [8997,10560] and [1509,4964] DEBUG: join prunable for intervals [8997,10560] and [2951,4455] DEBUG: join prunable for intervals [8997,10560] and [4480,5986] DEBUG: join prunable for intervals [8997,10560] and [12036,13473] DEBUG: join prunable for intervals [8997,10560] and [13473,14947] DEBUG: join prunable for intervals [10560,12036] and [1,1509] DEBUG: join prunable for intervals [10560,12036] and [1509,4964] DEBUG: join prunable for intervals [10560,12036] and [2951,4455] DEBUG: join prunable for intervals [10560,12036] and [4480,5986] DEBUG: join prunable for intervals [10560,12036] and [13473,14947] DEBUG: join prunable for intervals [12036,13473] and [1,1509] DEBUG: join prunable for intervals [12036,13473] and [1509,4964] DEBUG: join prunable for intervals [12036,13473] and [2951,4455] DEBUG: join prunable for intervals [12036,13473] and [4480,5986] DEBUG: join prunable for intervals [12036,13473] and [8997,10560] DEBUG: join prunable for intervals [13473,14947] and [1,1509] DEBUG: join prunable for intervals [13473,14947] and [1509,4964] DEBUG: join prunable for intervals [13473,14947] and [2951,4455] DEBUG: join prunable for intervals [13473,14947] and [4480,5986] DEBUG: join prunable for intervals [13473,14947] and [8997,10560] DEBUG: join prunable for intervals [13473,14947] and [10560,12036] DEBUG: pruning merge fetch taskId 1 DETAIL: Creating dependency on merge taskId 19 DEBUG: pruning merge fetch taskId 4 DETAIL: Creating dependency on merge taskId 19 DEBUG: pruning merge fetch taskId 7 DETAIL: Creating dependency on merge taskId 26 DEBUG: pruning merge fetch taskId 10 DETAIL: Creating dependency on merge taskId 26 DEBUG: pruning merge fetch taskId 13 DETAIL: Creating dependency on merge taskId 26 DEBUG: pruning merge fetch taskId 16 DETAIL: Creating dependency on merge taskId 26 DEBUG: pruning merge fetch taskId 19 DETAIL: Creating dependency on merge taskId 33 DEBUG: pruning merge fetch taskId 22 DETAIL: Creating dependency on merge taskId 33 DEBUG: pruning merge fetch taskId 25 DETAIL: Creating dependency on merge taskId 40 DEBUG: pruning merge fetch taskId 28 DETAIL: Creating dependency on merge taskId 40 DEBUG: pruning merge fetch taskId 31 DETAIL: Creating dependency on merge taskId 47 DEBUG: pruning merge fetch taskId 34 DETAIL: Creating dependency on merge taskId 47 DEBUG: pruning merge fetch taskId 37 DETAIL: Creating dependency on merge taskId 54 DEBUG: pruning merge fetch taskId 40 DETAIL: Creating dependency on merge taskId 54 DEBUG: pruning merge fetch taskId 43 DETAIL: Creating dependency on merge taskId 54 DEBUG: pruning merge fetch taskId 46 DETAIL: Creating dependency on merge taskId 61 DEBUG: pruning merge fetch taskId 49 DETAIL: Creating dependency on merge taskId 61 DEBUG: pruning merge fetch taskId 52 DETAIL: Creating dependency on merge taskId 61 DEBUG: pruning merge fetch taskId 55 DETAIL: Creating dependency on merge taskId 68 DEBUG: pruning merge fetch taskId 58 DETAIL: Creating dependency on merge taskId 68 DEBUG: assigned task 21 to node localhost:57637 DEBUG: assigned task 3 to node localhost:57638 DEBUG: assigned task 27 to node localhost:57637 DEBUG: assigned task 9 to node localhost:57638 DEBUG: assigned task 48 to node localhost:57637 DEBUG: assigned task 33 to node localhost:57638 DEBUG: assigned task 39 to node localhost:57637 DEBUG: assigned task 57 to node localhost:57638 DEBUG: propagating assignment from merge task 19 to constrained sql task 6 DEBUG: propagating assignment from merge task 26 to constrained sql task 12 DEBUG: propagating assignment from merge task 26 to constrained sql task 15 DEBUG: propagating assignment from merge task 26 to constrained sql task 18 DEBUG: propagating assignment from merge task 33 to constrained sql task 24 DEBUG: propagating assignment from merge task 40 to constrained sql task 30 DEBUG: propagating assignment from merge task 47 to constrained sql task 36 DEBUG: propagating assignment from merge task 54 to constrained sql task 42 DEBUG: propagating assignment from merge task 54 to constrained sql task 45 DEBUG: propagating assignment from merge task 61 to constrained sql task 51 DEBUG: propagating assignment from merge task 61 to constrained sql task 54 DEBUG: propagating assignment from merge task 68 to constrained sql task 60 count ------- 11998 (1 row) SET citus.large_table_shard_count TO 2; -- Dual hash repartition join which tests the separate hash repartition join -- task assignment algorithm. SELECT count(*) FROM lineitem, customer WHERE l_partkey = c_nationkey; DEBUG: assigned task 4 to node localhost:57637 DEBUG: assigned task 2 to node localhost:57638 DEBUG: assigned task 8 to node localhost:57637 DEBUG: assigned task 6 to node localhost:57638 DEBUG: assigned task 12 to node localhost:57637 DEBUG: assigned task 10 to node localhost:57638 DEBUG: assigned task 16 to node localhost:57637 DEBUG: assigned task 14 to node localhost:57638 DEBUG: assigned task 4 to node localhost:57637 DEBUG: assigned task 6 to node localhost:57638 DEBUG: assigned task 2 to node localhost:57637 DEBUG: join prunable for task partitionId 0 and 1 DEBUG: join prunable for task partitionId 0 and 2 DEBUG: join prunable for task partitionId 0 and 3 DEBUG: join prunable for task partitionId 1 and 0 DEBUG: join prunable for task partitionId 1 and 2 DEBUG: join prunable for task partitionId 1 and 3 DEBUG: join prunable for task partitionId 2 and 0 DEBUG: join prunable for task partitionId 2 and 1 DEBUG: join prunable for task partitionId 2 and 3 DEBUG: join prunable for task partitionId 3 and 0 DEBUG: join prunable for task partitionId 3 and 1 DEBUG: join prunable for task partitionId 3 and 2 DEBUG: pruning merge fetch taskId 1 DETAIL: Creating dependency on merge taskId 17 DEBUG: pruning merge fetch taskId 2 DETAIL: Creating dependency on merge taskId 7 DEBUG: pruning merge fetch taskId 4 DETAIL: Creating dependency on merge taskId 26 DEBUG: pruning merge fetch taskId 5 DETAIL: Creating dependency on merge taskId 11 DEBUG: pruning merge fetch taskId 7 DETAIL: Creating dependency on merge taskId 35 DEBUG: pruning merge fetch taskId 8 DETAIL: Creating dependency on merge taskId 15 DEBUG: pruning merge fetch taskId 10 DETAIL: Creating dependency on merge taskId 44 DEBUG: pruning merge fetch taskId 11 DETAIL: Creating dependency on merge taskId 19 DEBUG: assigned task 3 to node localhost:57638 DEBUG: assigned task 6 to node localhost:57637 DEBUG: assigned task 9 to node localhost:57638 DEBUG: assigned task 12 to node localhost:57637 count ------- 125 (1 row) -- Reset client logging level to its previous value SET client_min_messages TO NOTICE; COMMIT;