From d29ccee864118f65166a359c375d3f58ad3e5902 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Sun, 22 Sep 2024 10:29:05 +0200 Subject: [PATCH] Fix flaky transparent_decompress_chunk It can pick merge joins in favor of hash joins when testing outer joins. Since these tests are only testing outer joins and currently uses hash joins, we ensure that it will consistently pick those by disabling merge joins for these queries only. Merge join is used for other queries, so we do not disable merge join for the entire test. --- tsl/test/shared/expected/transparent_decompress_chunk-14.out | 4 ++++ tsl/test/shared/expected/transparent_decompress_chunk-15.out | 4 ++++ tsl/test/shared/expected/transparent_decompress_chunk-16.out | 4 ++++ tsl/test/shared/expected/transparent_decompress_chunk-17.out | 4 ++++ tsl/test/shared/sql/transparent_decompress_chunk.sql.in | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/tsl/test/shared/expected/transparent_decompress_chunk-14.out b/tsl/test/shared/expected/transparent_decompress_chunk-14.out index d48c2c2faba..b1e873f4682 100644 --- a/tsl/test/shared/expected/transparent_decompress_chunk-14.out +++ b/tsl/test/shared/expected/transparent_decompress_chunk-14.out @@ -780,6 +780,9 @@ QUERY PLAN -- test OUTER JOIN SET min_parallel_table_scan_size TO '0'; +-- Disable merge join to get stable tests. These queries uses hash +-- joins. +SET enable_mergejoin TO off; :PREFIX_NO_VERBOSE SELECT * FROM :TEST_TABLE m1 @@ -877,6 +880,7 @@ QUERY PLAN -> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1 (10 rows) +RESET enable_mergejoin; RESET parallel_leader_participation; :PREFIX SELECT * diff --git a/tsl/test/shared/expected/transparent_decompress_chunk-15.out b/tsl/test/shared/expected/transparent_decompress_chunk-15.out index b7e9890210c..41a40745859 100644 --- a/tsl/test/shared/expected/transparent_decompress_chunk-15.out +++ b/tsl/test/shared/expected/transparent_decompress_chunk-15.out @@ -782,6 +782,9 @@ QUERY PLAN -- test OUTER JOIN SET min_parallel_table_scan_size TO '0'; +-- Disable merge join to get stable tests. These queries uses hash +-- joins. +SET enable_mergejoin TO off; :PREFIX_NO_VERBOSE SELECT * FROM :TEST_TABLE m1 @@ -879,6 +882,7 @@ QUERY PLAN -> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1 (10 rows) +RESET enable_mergejoin; RESET parallel_leader_participation; :PREFIX SELECT * diff --git a/tsl/test/shared/expected/transparent_decompress_chunk-16.out b/tsl/test/shared/expected/transparent_decompress_chunk-16.out index 0f3bf7a552a..d2956dc0f19 100644 --- a/tsl/test/shared/expected/transparent_decompress_chunk-16.out +++ b/tsl/test/shared/expected/transparent_decompress_chunk-16.out @@ -782,6 +782,9 @@ QUERY PLAN -- test OUTER JOIN SET min_parallel_table_scan_size TO '0'; +-- Disable merge join to get stable tests. These queries uses hash +-- joins. +SET enable_mergejoin TO off; :PREFIX_NO_VERBOSE SELECT * FROM :TEST_TABLE m1 @@ -879,6 +882,7 @@ QUERY PLAN -> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1 (10 rows) +RESET enable_mergejoin; RESET parallel_leader_participation; :PREFIX SELECT * diff --git a/tsl/test/shared/expected/transparent_decompress_chunk-17.out b/tsl/test/shared/expected/transparent_decompress_chunk-17.out index 0f3bf7a552a..d2956dc0f19 100644 --- a/tsl/test/shared/expected/transparent_decompress_chunk-17.out +++ b/tsl/test/shared/expected/transparent_decompress_chunk-17.out @@ -782,6 +782,9 @@ QUERY PLAN -- test OUTER JOIN SET min_parallel_table_scan_size TO '0'; +-- Disable merge join to get stable tests. These queries uses hash +-- joins. +SET enable_mergejoin TO off; :PREFIX_NO_VERBOSE SELECT * FROM :TEST_TABLE m1 @@ -879,6 +882,7 @@ QUERY PLAN -> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1 (10 rows) +RESET enable_mergejoin; RESET parallel_leader_participation; :PREFIX SELECT * diff --git a/tsl/test/shared/sql/transparent_decompress_chunk.sql.in b/tsl/test/shared/sql/transparent_decompress_chunk.sql.in index d9a674a9404..45b5859d02c 100644 --- a/tsl/test/shared/sql/transparent_decompress_chunk.sql.in +++ b/tsl/test/shared/sql/transparent_decompress_chunk.sql.in @@ -241,6 +241,9 @@ FROM metrics m1 -- test OUTER JOIN SET min_parallel_table_scan_size TO '0'; +-- Disable merge join to get stable tests. These queries uses hash +-- joins. +SET enable_mergejoin TO off; :PREFIX_NO_VERBOSE SELECT * FROM :TEST_TABLE m1 @@ -288,6 +291,7 @@ ORDER BY m1.time, m1.device_id, m2.device_id LIMIT 10; +RESET enable_mergejoin; RESET parallel_leader_participation; :PREFIX