Repository navigation
Conversation
The secret_rows test helper files() listed the database directory and read every entry. SQLite can remove the WAL or the shared-memory index between the listing and the read, for example when a pooled connection closes, so the read answered NotFound and the test panicked. Skip an entry that is gone by the time files() reads it; a vanished transient file holds nothing the main database does not. Any other read error still fails the test. Refs #1132
eliseong
requested review from
LeeroyHannigan,
amrith,
c33howard,
demohan,
hitesh96db,
jcshepherd,
navareamol,
pdf-amzn and
robinnsc
as code owners
November 23, 2026 19:02
Collaborator
Author
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.
What
The
secret_rowstest helperfiles()listed the database directory and read every entry. SQLite can remove the WAL or the shared-memory index when its last connection closes, whichpool.close()can return before, so the read answeredNotFoundand the test panicked.files()now skips an entry that is gone by the time it reads it, and still fails the test on any other read error.Why
A rare CI flake: the test failed once on an unrelated change that touches no
extenddb-storage-sqlitefile. The failing call is the one afterpool.close();pool.close()returns before SQLite finishes closing every connection, so a last close can unlink the WAL and the index while the helper is reading the directory. Skipping a vanished file is safe here: every overwrite in this path truncates the WAL first, so a WAL that vanishes holds nothing.Closes #1132
Testing done
cargo test -p extenddb-storage-sqlite: all pass. The affected test ran 10 times with no failure.NotFoundsignature; the changed code did not fail under the same load.cargo fmt --check: clean.cargo clippy -p extenddb-storage-sqlite --all-targets -- -D warnings: clean.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
Notes on the checklist: this changes one test helper in
extenddb-storage-sqlite. I ran that crate's suite and clippy with-D warnings(the setting CI uses); the fullcargo test --workspaceruns in CI. The change fixes an existing test rather than adding functionality, so no new tests, docs, breaking changes, or RFC apply.ADR / RFC: n/a. Test-only.
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.