Skip to content

Respect maintenance recovery budgets in tests - #1530

Merged
bgentry merged 1 commit into
masterfrom
bg/fix-maintenance-recovery-ci
Oct 24, 2026
Merged

bgentry merged 1 commit into
masterfrom
bg/fix-maintenance-recovery-ci

Conversation

@bgentry

@bgentry bgentry commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

The maintenance recovery checks in this CI failure use the generic ten-second wait even though resignation attempts and backoff can take about thirteen seconds, followed by lease expiry if resignation fails. The periodic job also has a thirty-second insertion transaction timeout. The shorter waits can abort valid recovery and turn cleanup into a misleading commit cancellation error.

Give leadership recovery thirty seconds and allow periodic insertion its transaction timeout plus the normal event margin. Preserve the fresh-term, completed-job, and exact startup-count assertions. Add controlled resignation timeouts and an eleven-second periodic commit that reproduce both failures with the old waits and recover with the new ones. Capture Postgres activity, wait events, and blocking PIDs before client shutdown on failure.

The original run does not record database wait events, so this fixes the demonstrated deadline mismatches without attributing the initial database latency to a particular lock or storage event.

Maintenance recovery uses the generic ten-second CI wait even though
resignation attempts and backoff can take about thirteen seconds, and
periodic insertion permits a thirty-second transaction. Slow database
operations make the test abort a valid recovery and cancel its commit
during cleanup.

Give leadership recovery thirty seconds and allow periodic insertion its
transaction timeout plus the normal event margin. Preserve assertions for
a fresh leadership term, completed work, and exactly four startup attempts.

Exercise exhausted resignation attempts and a slow periodic commit with
controlled driver faults. Capture Postgres activity and blocking PIDs
before shutdown when recovery fails so database delays remain observable.
@bgentry
bgentry merged commit f51c2d0 into master Oct 24, 2026
23 checks passed
@bgentry
bgentry deleted the bg/fix-maintenance-recovery-ci branch October 24, 2026 13:44
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.

2 participants