Skip to content

Close unused SQLite connections#452

Open
lukewilliamboswell wants to merge 1 commit into
mainfrom
fix/sqlite-connection-lifecycle
Open

Close unused SQLite connections#452
lukewilliamboswell wants to merge 1 commit into
mainfrom
fix/sqlite-connection-lifecycle

Conversation

@lukewilliamboswell

Copy link
Copy Markdown
Collaborator

Summary

  • give prepared statements shared ownership of their SQLite connection
  • bound the ordinary path cache to 16 recently used connections while preserving sharing for live statements
  • keep the exact :memory: path pinned per host thread and document that behavior
  • close every non-null handle returned by a failed SQLite open
  • cover failed opens, cache eviction, live statements, and in-memory reuse with unit tests

Verification

  • cargo test --locked --lib
  • cargo check --locked
  • cargo clippy --locked --all-targets with existing generated-code lint exceptions
  • ./scripts/test.py --no-build

Closes #435

@lukewilliamboswell
lukewilliamboswell marked this pull request as ready for review July 22, 2026 01:56
@lukewilliamboswell
lukewilliamboswell force-pushed the fix/sqlite-connection-lifecycle branch from 26cfa0c to de94f8d Compare July 22, 2026 03:05
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.

Close SQLite connections and failed-open handles

1 participant