Skip to content

test(server): prepare long-query storage outside the event loop - #2207

Closed
AlexStocks wants to merge 2 commits into
oceanbase:codex/issue-2154-full-server-upgradefrom
AlexStocks:codex/2084-oceanbase-search-fixture
Closed

AlexStocks wants to merge 2 commits into
oceanbase:codex/issue-2154-full-server-upgradefrom
AlexStocks:codex/2084-oceanbase-search-fixture

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. No issue is closed by this PR.

Disposition

No merge is needed. The target author independently fixed the same nested event-loop failure in commit 1f6c89ce4c7e50c74878b746cc101c918ad2e8c3 by preparing the database before starting the async scenario. That fixture passed the real released seekDB HTTP case that failed at 23323a45, plus the SQLite HTTP ASCII control: 2 passed, zero failures/errors/skips.

The author's fixture was validated on a local copy; only that test file changed between these two target commits. The independent fork worktree was restored afterward. No branch or PR metadata belonging to #2168 was written during this follow-up.

Rationale for this change

At base 23323a459d87aee845b3c1d95226e7982673c7f5, the clean seekDB migration job passes all 47 migration cases and then fails the long-query HTTP fixture with RuntimeError: asyncio.run() cannot be called from a running event loop (run 39925388091, job 120320690619).

This independent alternative calls synchronous database preparation through await asyncio.to_thread(...) before HTTP application startup. Its target-relative diff is one test file, +2/-1. All original search assertions remain.

Are there any user-facing changes?

Test setup only.

How was this change tested?

  • This PR's own variant passed 6 real released seekDB/SQLite tests, zero failures/errors/skips.
  • The target author's current fixture passed the targeted 2 real seekDB/SQLite tests described above.
  • The initial variant on parent 04a33ffc4e64 completed ten SQLite/actual OceanBase CE 4.3.5.6 long-query/recovery cases.
  • Scoped Ruff, formatting, Python 3.11 Ty and diff checks passed on this PR's variant.
  • Full pre-commit was attempted on the initial variant; its package-building Ty hook could not discover VCS metadata through this Windows-linked worktree under WSL.

These checkout tests establish the fixture repair, not installed-release upgrade acceptance. #2084 and #2154 still require their remaining validation and integration.

AI usage statement

Implemented and validated with OpenAI Codex under maintainer direction.

Prepare the long-query HTTP fixture through the registered Server maintenance
flow before startup, using the same settings and embedding profile.

Constraint: Preserve remote startup rejection and every retrieval assertion.
Scope-risk: Test setup only; targets the migration framework branch through a separate PR.
Tested: Real OceanBase baseline reproduces migration_required; SQLite/OceanBase JUnit records 10 passed, zero skips. Scoped Ruff, format and Python 3.11 Ty passed. Full prek is blocked by WSL/Windows Git metadata discovery.
@AlexStocks
AlexStocks requested a review from PsiACE as a code owner October 23, 2026 09:04
@AlexStocks AlexStocks closed this Oct 23, 2026
Merge the target branch into the independent fixture repair, keeping its
current initialization settings and running the synchronous preparation
through asyncio.to_thread before HTTP application startup.

Constraint: Preserve the target author's schema and startup snapshot changes.
Scope-risk: Test initialization only; all search assertions remain intact.
Tested: Scoped Ruff, Ruff format, Python 3.11 Ty and git diff --check.
Tested: Six real seekDB/SQLite HTTP search and recovery cases, zero skips.
@AlexStocks AlexStocks changed the title test(server): initialize long-query HTTP search storage test(server): prepare long-query storage outside the event loop Oct 23, 2026
@AlexStocks AlexStocks reopened this Oct 23, 2026
@AlexStocks AlexStocks closed this Oct 23, 2026
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