mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 05:13:01 +03:00
[PR #876] [MERGED] fix: ensure SQLite has a writable temporary directory #578
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/876
Author: @ItalyPaleAle
Created: 8/24/2025
Status: ✅ Merged
Merged: 8/24/2025
Merged by: @stonith404
Base:
main← Head:fix-866-2📝 Commits (5)
6b11a53fix: ensure SQLite has a writable temporary directory4fa72c6fix: actually read random bytesc492b62Tweak11d2012Merge branch 'main' into fix-866-20402af4Merge branch 'main' into fix-866-2📊 Changes
2 files changed (+109 additions, -5 deletions)
View changed files
📝
backend/internal/bootstrap/db_bootstrap.go(+68 -5)📝
backend/internal/utils/file_util.go(+41 -0)📄 Description
The issue is that when performing some large queries (that use a lot of temporary directories, for example), SQLite sometimes needs to write to a temporary file. The file is usually placed in folders like /var/tmp, /usr/tmp, or /tmp. This is explained in the docs: https://www.sqlite.org/tempfiles.html#temporary_file_storage_locations
However, in a container running with a read-only root file system, those folders do not exist or are not writable.
This PR should fix #866, although I haven't had a chance to reproduce the exact behavior.
How this was tested:
disk I/O error (6410)), and work after🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.