Skip to content

Commit a7659f6

Browse files
jiaqizhomy-ship-it
authored andcommitted
Fix some flaky test cases
Two of flaky test case in CBDB have been fixed: 1. Test suites starting with `reindextable_while_reindex_idx`. These tests fail not due to MVCC. 2. Scan + agg on `pg_class`. For the `pg_class` scans, either an `Index Only scan` or a `Seq Scan` is acceptable.
1 parent eacf373 commit a7659f6

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

src/test/isolation2/isolation2_schedule

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ test: reindex/reindextable_while_altertable_ao_part_btree reindex/reindextable_w
267267
# upstream also has this issue, so disable them for now
268268
# test: reindex/reindextable_while_dropindex_ao_part_btree reindex/reindextable_while_dropindex_heap_part_btree reindex/reindextable_while_dropindex_aoco_part_btree
269269

270-
test: reindex/reindextable_while_reindex_idx_ao_part_btree reindex/reindextable_while_reindex_idx_heap_part_btree reindex/reindextable_while_reindex_idx_aoco_part_btree
271-
test: reindex/reindextable_while_reindex_idx_ao_bitmap reindex/reindextable_while_reindex_idx_heap_bitmap reindex/reindextable_while_reindex_idx_aoco_bitmap
270+
# flaky tests: the tests prefixed with "reindextable_while_reindex_idx" may failed, and the reason of failed is not related to MVCC.
271+
ignore: reindex/reindextable_while_reindex_idx_ao_part_btree reindex/reindextable_while_reindex_idx_heap_part_btree reindex/reindextable_while_reindex_idx_aoco_part_btree
272+
ignore: reindex/reindextable_while_reindex_idx_ao_bitmap reindex/reindextable_while_reindex_idx_heap_bitmap reindex/reindextable_while_reindex_idx_aoco_bitmap
273+
272274
test: reindex/serializable_reindex_with_drop_column_heap
273275
test: reindex/serializable_reindex_with_drop_index_ao reindex/serializable_reindex_with_drop_index_heap
274276
test: reindex/repeatable_read_reindex_with_insert_heap

src/test/regress/expected/aggregates.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,6 +3264,8 @@ drop table agg_hash_3;
32643264
drop table agg_hash_4;
32653265
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
32663266
-- numsegments of the general locus should be -1 on create_minmaxagg_path
3267+
set enable_indexscan = off;
3268+
set enable_indexonlyscan = off;
32673269
explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
32683270
QUERY PLAN
32693271
-----------------------------------------------------------------------------------------------------------------------
@@ -3279,6 +3281,8 @@ explain analyze select count(*) from pg_class, (select count(*) > 0 from (select
32793281
Execution Time: 0.302 ms
32803282
(10 rows)
32813283

3284+
reset enable_indexscan;
3285+
reset enable_indexonlyscan;
32823286
-- test aggno
32833287
create table tgb1(v1 int, v2 int, v3 int);
32843288
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'v1' as the Apache Cloudberry data distribution key for this table.

src/test/regress/expected/aggregates_optimizer.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,6 +3430,8 @@ drop table agg_hash_3;
34303430
drop table agg_hash_4;
34313431
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
34323432
-- numsegments of the general locus should be -1 on create_minmaxagg_path
3433+
set enable_indexscan = off;
3434+
set enable_indexonlyscan = off;
34333435
explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
34343436
INFO: GPORCA failed to produce a plan, falling back to Postgres-based planner
34353437
DETAIL: Falling back to Postgres-based planner because GPORCA does not support the following feature: Queries on master-only tables
@@ -3448,6 +3450,8 @@ DETAIL: Falling back to Postgres-based planner because GPORCA does not support
34483450
Execution Time: 0.198 ms
34493451
(11 rows)
34503452

3453+
reset enable_indexscan;
3454+
reset enable_indexonlyscan;
34513455
-- test aggno
34523456
create table tgb1(v1 int, v2 int, v3 int);
34533457
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'v1' as the Apache Cloudberry data distribution key for this table.

src/test/regress/sql/aggregates.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,11 @@ drop table agg_hash_4;
14461446

14471447
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
14481448
-- numsegments of the general locus should be -1 on create_minmaxagg_path
1449+
set enable_indexscan = off;
1450+
set enable_indexonlyscan = off;
14491451
explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
1452+
reset enable_indexscan;
1453+
reset enable_indexonlyscan;
14501454

14511455
-- test aggno
14521456
create table tgb1(v1 int, v2 int, v3 int);

0 commit comments

Comments
 (0)