Repository navigation
fix(sqlite): join failed reader startup before returning pins - #4890
Merged
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Reader startup reports a SQLite open or setup failure before the storage-pool task has finished dropping its owned locator and file pins. The caller currently returns that error immediately, so reserved initialization can race worker teardown and refuse to return the original database and sidecar handles for retry.
The existing
repository::attachment::tests::reader_start_failure_returns_idle_initialization_files_for_retryregression exposed this on the #4863 Linux run: the isolated child received the expected SQLite out-of-memory failure, then failed its assertion that the original handles had been returned.Change
Join the failed reader task before returning either its typed startup error or a closed startup-channel error. Successful startup keeps the same worker handle and behavior. This follows the writer's existing startup ownership boundary.
The validation follow-up reuses one real canonical database across the workflow cancellation sweep. Each case restores the exact published SQL state, digest, and artifact rows before admission, drops raw handles, then verifies the full baseline state. The original cancellation samples, reopen cases, retirement joins, and assertions remain unchanged. This removes repeated baseline creation measured in the same owning test; fresh validation of the combined change is still required.
The combined update integrates the reviewed master changes. An intermediate head temporarily captured synchronous settlement phase timings in the two affected fixtures. After that head passed all 180 Linux targets, the exact capture cleanup was published. Original test bodies, ownership, workloads, and five-second waits are unchanged. The successful run retained no phase output, so no latency cause or separate automation repair is claimed.
Validation before this follow-up
git diff --check. The new combined head still requires fresh hosted checks.01b0ebb6freshly passed all 489 rusqlite-runtime tests in 20.09 seconds, including the real SQLite out-of-memory handle-return and healthy-retry regression.01b0ebb6passed 467 targets and 26,393 actions. This was build/typecheck validation.Validation on the prior clean head
Prior clean head
6ae41e2fretains the reader repair, workflow fixture reuse, and reviewed master integration; both temporary capture changes are removed.e55cf7c8passed 180/180 targets, with 111 freshly executed. Automation passed freshly in 61.8 seconds, global-db in 124.1 seconds, and runtime acceptance in 112.5 seconds.Current fixture follow-up
The independently reviewed follow-up
5a227736separates canonical registered schema initialization from opening a raw test connection. At 27 temporal-schema fixture sites, the old code opened aTestConnection, immediately dropped it without using it, and then opened the same database again. The follow-up performs the required registered publication and admission once, then opens only the raw connection the test actually uses.This removes redundant fixture actor startup and teardown. Registered ownership and release, all used connections, test data, assertions, reopen cases, deadlines, and concurrency settings remain unchanged. It is not an established cause or fix for the whole-target timeout, and no speedup has been measured.
The pinned Rust 1.100.0 formatter, commitlint, and
git diff --checkpassed. Independent source review and an exact reverse-transformation check verified that the four test files differ only at those 27 unused-open/drop sites. No local Rust compilation or test run was performed. The candidate is published on this PR. Final hosted Linux validation on this head passed all 180 targets, with 27 freshly executed. Global-db passed freshly in 208.7 seconds, MCP in 303.4 seconds, runtime acceptance in 128.5 seconds, and transcript in 154.0 seconds. Rusqlite-runtime and automation were cached on this fixture-only follow-up; their earlier fresh owning-test evidence is recorded above. Windows build/typecheck on this head passed 467 targets and 26,370 actions, including 18 remote executions, in 959.120 seconds. The complete terminal Linux and Windows logs were preserved. The ordinary Windows job did not execute native tests.All ordinary CI gates are successful or legitimately skipped, with no unresolved review threads. An independent merge preview against actual master
6c5599dfproduces master’s existing treef82a927d: intervening reviewed merges already incorporated these source changes. The normal merge therefore records this PR’s completion without introducing an additional source change.