Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#10855] YSQL: fix flakiness of test yb_pg_partition_aggregate
Summary: The test fails with the following error: ``` *** /tmp/yb_tests__2021-12-12T14_29_06__17676.17249.17116/pgregress_output/expected/yb_pg_partition_aggregate.out 2021-12-12 14:47:10.730866113 +0000 --- /tmp/yb_tests__2021-12-12T14_29_06__17676.17249.17116/pgregress_output/results/yb_pg_partition_aggregate.out 2021-12-12 14:47:10.603854965 +0000 *************** *** 710,715 **** --- 710,716 ---- ALTER TABLE pagg_tab_ml ATTACH PARTITION pagg_tab_ml_p3 FOR VALUES FROM (20) TO (30); INSERT INTO pagg_tab_ml SELECT i % 30, i % 10, to_char(i % 4, 'FM0000') FROM generate_series(0, 29999) i; ANALYZE pagg_tab_ml; + ERROR: Operation failed. Try again: Transaction aborted: b69768c7-0be1-435b-aa86-ce3989f27948 -- For Parallel Append SET max_parallel_workers_per_gather TO 2; -- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY ``` This is because of the large number of rows (30,000) in the pagg_tab_ml. This also happens for the table pagg_tab_para which also contains 30,000 rows. GHI [[ #10989 | #10989 ]] tracks why the large number of rows leads to transaction abort, but as part of this fix, the number for rows for this table is reduced. Further flakiness is because the test times out at 1800 seconds (irrespective of the value of getTestMethodTimeout()), which is the timeout for process_tree_supervisor set in common-test-env.sh. Since the Partitions test is now extremely long-running, this patch breaks up the partitions schedule into smaller and more manageable schedules. Running multiple schedules from the same PgRegressTest was causing a conflict while creating the pg_regress output dir. Hence, this patch creates a new subdirectory for the outputdir using the schedule's name. Test Plan: ybd --scb --sj --java-test org.yb.pgsql.TestPgRegressPartitions' Reviewers: alex Reviewed By: alex Subscribers: kannan, yql Differential Revision: https://phabricator.dev.yugabyte.com/D14613
- Loading branch information