fix(db): harden sqlite pragmas and dispose engine cleanly#125
Closed
mojomast wants to merge 1 commit intofollowup/pr124-auth-securityfrom
Closed
fix(db): harden sqlite pragmas and dispose engine cleanly#125mojomast wants to merge 1 commit intofollowup/pr124-auth-securityfrom
mojomast wants to merge 1 commit intofollowup/pr124-auth-securityfrom
Conversation
Collaborator
Author
|
Superseded by updates pushed to #123 to keep all MVP changes in one review thread. |
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.
Summary
WAL,synchronous=NORMAL,temp_store=MEMORY,foreign_keys=ON, configuredbusy_timeout)SQLITE_BUSY_TIMEOUT_MSsupport and set engine connect timeout accordingly for better write contention behavior.env.exampleandREADME.mdVerification
PYTHONPATH=src .venv/bin/python -m py_compile src/proxy_app/db.py src/proxy_app/main.py tests/test_db_runtime.pyPYTHONPATH=src .venv/bin/pytest -q tests/test_db_runtime.pyImportant
Enhance SQLite handling by applying runtime pragmas, introducing a configurable busy timeout, and ensuring clean engine disposal.
WAL,synchronous=NORMAL,temp_store=MEMORY,foreign_keys=ON,busy_timeout) on each connection indb.py.SQLITE_BUSY_TIMEOUT_MSenvironment variable for configuring SQLite busy timeout.db.pyto return engine and session maker separately.main.py.SQLITE_BUSY_TIMEOUT_MSin.env.exampleandREADME.md.test_sqlite_pragmas_are_appliedintest_db_runtime.pyto verify SQLite pragmas are correctly applied.This description was created by
for 4365eed. You can customize this summary. It will automatically update as commits are pushed.