Replace flaky repartition analyze test with a non flaky one (#3950)

The flaky test was introduced in #3941. This removes that flaky test and
adds a new one that fails in the same manner when removing the fix in #3941.

An example of a random failure can be found here:
https://app.circleci.com/pipelines/github/citusdata/citus/9558/workflows/de76e7a5-6558-46c9-97e7-8b1dae1f173b/jobs/135876/steps
pull/3955/head
Jelte Fennema 2020-06-25 15:19:15 +02:00 committed by GitHub
parent 50e115fe3a
commit 64506143e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 89 deletions

View File

@ -864,70 +864,6 @@ LOG: join order: [ "stock" ][ reference join "item" ][ dual partition join "ord
abc | def
(1 row)
\set default_analyze_flags '(ANALYZE on, COSTS off, TIMING off, SUMMARY off)'
EXPLAIN :default_analyze_flags SELECT
su_name,
su_address
FROM
supplier,
nation
WHERE su_suppkey in
(SELECT
mod(s_i_id * s_w_id, 10000)
FROM
stock,
order_line
WHERE s_i_id IN
(SELECT i_id
FROM item
WHERE i_data LIKE 'co%')
AND ol_i_id = s_i_id
AND ol_delivery_d > '2008-05-23 12:00:00' -- was 2010, but our order is in 2008
GROUP BY s_i_id, s_w_id, s_quantity
HAVING 2*s_quantity > sum(ol_quantity))
AND su_nationkey = n_nationkey
AND n_name = 'Germany'
ORDER BY su_name;
LOG: join order: [ "stock" ][ reference join "item" ][ dual partition join "order_line" ]
QUERY PLAN
---------------------------------------------------------------------
Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
-> Distributed Subplan XXX_1
Intermediate Data Size: 30 bytes
Result destination: Send to 2 nodes
-> Custom Scan (Citus Adaptive) (actual rows=3 loops=1)
Task Count: 4
Tuple data received from nodes: 12 bytes
Tasks Shown: None, not supported for re-partition queries
-> MapMergeJob
Map Task Count: 4
Merge Task Count: 4
-> MapMergeJob
Map Task Count: 4
Merge Task Count: 4
Task Count: 1
Tuple data received from nodes: 28 bytes
Tasks Shown: All
-> Task
Tuple data received from node: 28 bytes
Node: host=localhost port=xxxxx dbname=regression
-> Sort (actual rows=1 loops=1)
Sort Key: supplier.su_name
Sort Method: quicksort Memory: 25kB
-> Nested Loop Semi Join (actual rows=1 loops=1)
Join Filter: (supplier.su_suppkey = intermediate_result.mod)
Rows Removed by Join Filter: 1
-> Hash Join (actual rows=1 loops=1)
Hash Cond: (supplier.su_nationkey = nation.n_nationkey)
-> Seq Scan on supplier_1650035 supplier (actual rows=11 loops=1)
-> Hash (actual rows=1 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 9kB
-> Seq Scan on nation_1650034 nation (actual rows=1 loops=1)
Filter: (n_name = 'Germany'::bpchar)
Rows Removed by Filter: 3
-> Function Scan on read_intermediate_result intermediate_result (actual rows=2 loops=1)
(35 rows)
-- Query 21
-- DATA SET DOES NOT COVER THIS QUERY
SELECT

View File

@ -311,6 +311,33 @@ Aggregate (actual rows=1 loops=1)
-> MapMergeJob
Map Task Count: 3
Merge Task Count: 4
-- Confirm repartiton join in distributed subplan works
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off)
WITH repartion AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b)
SELECT count(*) from repartion;
Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
-> Distributed Subplan XXX_1
Intermediate Data Size: 14 bytes
Result destination: Write locally
-> Aggregate (actual rows=1 loops=1)
-> Custom Scan (Citus Adaptive) (actual rows=4 loops=1)
Task Count: 4
Tuple data received from nodes: 4 bytes
Tasks Shown: None, not supported for re-partition queries
-> MapMergeJob
Map Task Count: 3
Merge Task Count: 4
-> MapMergeJob
Map Task Count: 3
Merge Task Count: 4
Task Count: 1
Tuple data received from nodes: 1 bytes
Tasks Shown: All
-> Task
Tuple data received from node: 1 bytes
Node: host=localhost port=xxxxx dbname=regression
-> Aggregate (actual rows=1 loops=1)
-> Function Scan on read_intermediate_result intermediate_result (actual rows=1 loops=1)
END;
DROP TABLE t1, t2;
-- Test query text output, with ANALYZE ON

View File

@ -673,31 +673,6 @@ WHERE su_suppkey in
AND n_name = 'Germany'
ORDER BY su_name;
\set default_analyze_flags '(ANALYZE on, COSTS off, TIMING off, SUMMARY off)'
EXPLAIN :default_analyze_flags SELECT
su_name,
su_address
FROM
supplier,
nation
WHERE su_suppkey in
(SELECT
mod(s_i_id * s_w_id, 10000)
FROM
stock,
order_line
WHERE s_i_id IN
(SELECT i_id
FROM item
WHERE i_data LIKE 'co%')
AND ol_i_id = s_i_id
AND ol_delivery_d > '2008-05-23 12:00:00' -- was 2010, but our order is in 2008
GROUP BY s_i_id, s_w_id, s_quantity
HAVING 2*s_quantity > sum(ol_quantity))
AND su_nationkey = n_nationkey
AND n_name = 'Germany'
ORDER BY su_name;
-- Query 21
-- DATA SET DOES NOT COVER THIS QUERY

View File

@ -93,6 +93,10 @@ SELECT create_distributed_table('t1', 'a'), create_distributed_table('t2', 'a');
BEGIN;
SET LOCAL citus.enable_repartition_joins TO true;
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off) SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b;
-- Confirm repartiton join in distributed subplan works
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off)
WITH repartion AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b)
SELECT count(*) from repartion;
END;
DROP TABLE t1, t2;