Skip to content

Fix flaky VACUUM, AO, and diskquota tests - #2051

Open
krylosov-aa wants to merge 1 commit into
apache:mainfrom
krylosov-aa:fix-flaky-test
Open

krylosov-aa wants to merge 1 commit into
apache:mainfrom
krylosov-aa:fix-flaky-test

Conversation

@krylosov-aa

Copy link
Copy Markdown
Contributor

What does this PR do?

These tests could fail when background work took longer than expected:

  • VACUUM could continue before FTS finished detecting a stopped mirror, so the expected worker change did not happen.
  • The AO snapshot test used a fixed sleep. The reader could finish too early, allowing VACUUM to remove files that the test expected to keep.
  • The diskquota test could run queries before failover was ready or start rebalance before recovery had finished.

This change replaces timing assumptions with explicit waits. VACUUM waits for FTS before continuing. The AO reader stays blocked on an advisory lock until both VACUUM operations finish. The diskquota test waits for the expected segment state and a successful distributed query, then waits for synchronization before rebalance.

Type of Change

  • Bug fix (non-breaking change)

Test Plan

Local checks on Linux ARM64

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant