Skip to content

Change journal mode from WAL to DELETE - #339

Open
antnorwe wants to merge 1 commit into
jordan-dalby:mainfrom
antnorwe:main
Open

Change journal mode from WAL to DELETE#339
antnorwe wants to merge 1 commit into
jordan-dalby:mainfrom
antnorwe:main

Conversation

@antnorwe

Copy link
Copy Markdown

When using an SMB/CIFS share as the location of the volume, the SQLite DB cannot correctly intialise due to file locking errors:

 SqliteError: database is locked                                                                                                                                                                       │
│     at Database.pragma (/app/node_modules/better-sqlite3/lib/methods/pragma.js:11:44)                                                                                                                 │
│     at initializeDatabase (file:///app/src/config/database.js:108:8)                                                                                                                                  │
│     at file:///app/src/app.js:130:9                                                                                                                                                                   │
│     at file:///app/src/app.js:138:3                                                                                                                                                                   │
│     at ModuleJob.run (node:internal/modules/esm/module_job:343:25)                                                                                                                                    │
│     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)                                                                                                                │
│     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) {                                                                                                                 │
│   code: 'SQLITE_BUSY' 

Another project that uses SQLite had a similar issue, and the proposed fix was their solution:

https://github.com/charmbracelet/crush/pull/1280/changes

Therefore submitting here to achieve the same outcome of allowing me to store data on a mounted SMB/CIFS drive

@jordan-dalby

Copy link
Copy Markdown
Owner

Hi, thanks! My only worry here is the reduced concurrency support in DELETE mode. Let me do a little testing with this setting, will come back with my findings.

@antnorwe

Copy link
Copy Markdown
Author

Thanks for the quick response! If that remains a concern, maybe this could be added as an optional env variable so that we can choose to take the risk?

@jordan-dalby

Copy link
Copy Markdown
Owner

Thanks for the quick response! If that remains a concern, maybe this could be added as an optional env variable so that we can choose to take the risk?

Fine by me!

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.

2 participants