Database(is_temp_disk=True) option, used for internal database#2684
Merged
Conversation
Replace the default in-memory internal database with a temporary file-backed database using WAL mode. This fixes concurrent read/write locking errors that occur with named in-memory SQLite databases. The new is_temp_disk parameter on Database creates a temp file via tempfile.mkstemp, connects to it as a regular file-based database with WAL mode enabled, and cleans it up on close() and via atexit. https://claude.ai/code/session_01TteLrUjpDcARjnP1GMRqz2
Make is_temp_disk a public attribute (matching is_memory convention) and document it in the Database constructor reference and properties section of the internals docs. https://claude.ai/code/session_01TteLrUjpDcARjnP1GMRqz2
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2684 +/- ##
==========================================
+ Coverage 90.60% 90.80% +0.19%
==========================================
Files 55 55
Lines 8487 8517 +30
==========================================
+ Hits 7690 7734 +44
+ Misses 797 783 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cover all database types: mutable file, immutable file, memory, named memory, temp disk, and immutable memory databases. https://claude.ai/code/session_01TteLrUjpDcARjnP1GMRqz2
Temp disk databases are backed by real files, so size and mtime_ns should return actual values rather than the 0/None used for in-memory databases. https://claude.ai/code/session_01TteLrUjpDcARjnP1GMRqz2
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.
Refs:
Replace the default in-memory internal database with a temporary
file-backed database using WAL mode. This fixes concurrent read/write
locking errors that occur with named in-memory SQLite databases.
The new is_temp_disk parameter on Database creates a temp file via
tempfile.mkstemp, connects to it as a regular file-based database
with WAL mode enabled, and cleans it up on close() and via atexit.
https://claude.ai/code/session_01TteLrUjpDcARjnP1GMRqz2