Skip to content

Fix flaky tests main - #2060

Merged
leborchuk merged 8 commits into
apache:mainfrom
Alena0704:fix-flaky-tests-main
Oct 8, 2026
Merged

leborchuk merged 8 commits into
apache:mainfrom
Alena0704:fix-flaky-tests-main

Conversation

@Alena0704

Copy link
Copy Markdown
Collaborator

Collect all fixes from #2032 that can improve CI stability after having reviewed with refactored commit messages.

Author: Dianjin Wang wangdianjin@gmail.com
Assisted-by: Claude Code

Also ported fix for main from #2034

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@Alena0704
Alena0704 force-pushed the fix-flaky-tests-main branch 2 times, most recently from c74f29d to 505f0f3 Compare September 29, 2026 16:40
@Alena0704 Alena0704 mentioned this pull request Sep 29, 2026
13 tasks

@leborchuk leborchuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leborchuk leborchuk added the CI label Oct 2, 2026
Comment thread src/test/regress/sql/task.sql
Comment thread src/test/isolation2/sql/resgroup/resgroup_cpu_max_percent.sql
@Alena0704
Alena0704 force-pushed the fix-flaky-tests-main branch 5 times, most recently from 4cfeffd to e9ab4a4 Compare October 6, 2026 13:53

@MisterRaindrop MisterRaindrop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tuhaihe and others added 8 commits October 8, 2026 11:44
Replace pg_sleep() with gp_stat_force_next_flush() to force a stats
flush instead of waiting. Update the expected output.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
The test already averages CPU samples, but the expected values are
still too low. The suite sets the cluster CPU limit to 100%, so expect
100% for one uncapped group and 33%/67% for groups with weights 100/200.

Keep the existing tolerance of 10 percentage points.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
These tasks only check that valid schedules are accepted.
Deactivate them after creation to avoid background runs interfering
with cleanup and the oid_wraparound test.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
The tests read pg_stat_all_tables right after the DELETE, while the
stats of the aborted inserts may not have arrived yet and those of the
DELETE may already have.  Wait for the stats of the aborts and read the
view before the DELETE instead.
Run CHECKPOINT before waiting for the standby to catch up, so the
slot's restart_lsn is updated before checking WAL status.

Ported from Greenplum.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
hot_standby/transaction_isolation deliberately panics the standby and
reconnects to check distributed transaction visibility after recovery.
The new connection can arrive before consistent recovery is reached,
when the server reports "the database system is not yet accepting
connections". This message was missing from the connection retry list.

Retry this transient state using the existing attempt limit and interval.
Keep the crash scenario and all transaction visibility checks intact.

Backport required: REL_2_STABLE is affected by the same race.
@Alena0704
Alena0704 force-pushed the fix-flaky-tests-main branch from e9ab4a4 to 9ec9f4c Compare October 8, 2026 08:44
@leborchuk
leborchuk enabled auto-merge (rebase) October 8, 2026 08:49
@Alena0704

Copy link
Copy Markdown
Collaborator Author

Backport the current fixes on REL_2_STABLE #2061

@Alena0704 Alena0704 mentioned this pull request Oct 8, 2026
5 of 13 tasks
@leborchuk
leborchuk disabled auto-merge October 8, 2026 09:43
@leborchuk
leborchuk enabled auto-merge (rebase) October 8, 2026 09:44
@leborchuk
leborchuk merged commit 7cfd224 into apache:main Oct 8, 2026
109 of 110 checks passed
@Alena0704
Alena0704 deleted the fix-flaky-tests-main branch October 8, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants