Skip to content

test(runtime): await commit-lock recovery settlement - #2208

Merged
hidb4ai merged 1 commit into
oceanbase:masterfrom
AlexStocks:codex/2084-usage-recovery-test
Oct 23, 2026
Merged

hidb4ai merged 1 commit into
oceanbase:masterfrom
AlexStocks:codex/2084-usage-recovery-test

Conversation

@AlexStocks

@AlexStocks AlexStocks commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Refs #2084 and #2168. This is an independent test repair against master; it does not close either issue.

Rationale for this change

The commit-lock recovery regression can read an empty usage result after flush() returns. The default flush is best effort and waits only 0.5 seconds, while a healthy usage write has a one-second budget. A returning flush therefore does not establish settlement.

This occurred in #2168's Python 3.13 unit job at 1f6c89ce: job 120342714916. The test and runtime files are identical on master 464cd152.

What changes are included in this PR?

Give this test a two-second flush allowance so its recovery assertion waits beyond the default write budget. Keep the one-second write allowance, the blocked attempt's 40ms override, its 0.5-second latency assertion, rollback checks and connection-restoration checks unchanged.

Are there any user-facing changes?

Test fixture only. Runtime deadlines and best-effort statistics behavior remain unchanged.

How was this change tested?

  • A local diagnostic delays only the healthy recovery consumer by 0.65 seconds, with real SQLite. The original test fails with the same IndexError; the repaired fixture passes. The diagnostic is not added to the test suite.

  • pytest -q tests/builtin/runtime/test_model_usage_recorder.py: 32 passed, zero failures/errors/skips.

  • Scoped Ruff, Ruff formatting, Python 3.11 Ty and git diff --check pass.

  • Full prek run -a was attempted. Its Ty hook cannot discover package VCS metadata through this Windows-linked checkout under WSL. A full pre-commit pass is not claimed; the tracked diff contains only the intended test fixture.

  • GitHub Actions at 49e40d74: all checks have finished, with 30 successful and 18 skipped jobs. Python 3.11-3.14 unit jobs each report 5,347 passed / 152 skipped. SeekDB and OceanBase JUnit artifacts each include 47 clean migration and 8 long-query cases with no failures, errors or skips. The OceanBase artifact also includes two Scope-search and one background-metrics case, all passing. These checkout results do not establish full Server installed-release upgrade acceptance.

AI usage statement

Implemented and validated with OpenAI Codex under maintainer direction.

Allow the existing recovery test to wait beyond the default write budget
instead of treating the short best-effort flush as proof of persistence.

Constraint: Keep runtime defaults and the blocked-write latency assertion.
Scope-risk: One test fixture; rollback and connection checks remain intact.
Tested: Existing test red/green with 0.65s controlled consumer delay.
Tested: Usage recorder module, 32 passed; scoped Ruff, format and Python 3.11 Ty.
@AlexStocks
AlexStocks requested a review from PsiACE as a code owner October 23, 2026 09:56
Copilot AI balanced review requested due to automatic review settings October 23, 2026 09:56

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hidb4ai hidb4ai 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

@hidb4ai
hidb4ai merged commit 1da9974 into oceanbase:master Oct 23, 2026
48 checks passed
@hidb4ai hidb4ai added the 1.4.1 v1.4.1 release tracking label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.4.1 v1.4.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants