Skip to content

[BR-2319]: feat/add support for configurable SQLite journal mode and enhance entrypoint logging - #690

Merged
jzunigax2 merged 2 commits into
mainfrom
feat/default-to-sqlite-wal-mode
Oct 5, 2026
Merged

jzunigax2 merged 2 commits into
mainfrom
feat/default-to-sqlite-wal-mode

Conversation

@jzunigax2

Copy link
Copy Markdown
Contributor

Switches the local SQLite database (the drive item cache) to WAL journal mode, and adds an env var to opt out.

Every CLI command opens this database. In Docker, the keep-alive loop runs internxt whoami every 30s while the WebDAV server has the same file open. In the default rollback-journal mode, readers and the writer block each other. WAL lets reads and writes run at the same time.

Changes

  • WAL by default: prepareDatabase sets journal_mode = WAL and journal_size_limit = 16MB when the connection opens, before TypeORM applies its own pragmas.
  • Opt-out flag: INXT_SQLITE_JOURNAL_MODE=DELETE switches back to the rollback journal. It sets DELETE explicitly, because WAL mode is saved in the database file and a file that's already in WAL would otherwise stay in WAL. Unknown values log a warning and use WAL.
  • Fallback detection: SQLite doesn't throw when it can't use the requested mode. It returns the mode it actually used (for example memory). We now compare that value and log a warning when it doesn't match. Errors that are thrown (for example SQLITE_BUSY) are still logged, not raised.
  • Docker: the entrypoint logs the CLI version at startup, and docker/README.md documents the new env var.

@jzunigax2 jzunigax2 self-assigned this Sep 23, 2026
@jzunigax2 jzunigax2 changed the title feat(database): add support for configurable SQLite journal mode and enhance entrypoint logging [BR-2319]: feat/add support for configurable SQLite journal mode and enhance entrypoint logging Sep 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@jzunigax2
jzunigax2 merged commit a2bb3dd into main Oct 5, 2026
9 checks passed
@jzunigax2
jzunigax2 deleted the feat/default-to-sqlite-wal-mode branch October 5, 2026 14:14
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.

3 participants