[PR #1817] [MERGED] Change PRAGMA mode from WAL to TRUNCATE #8726

Closed
opened 2025-12-22 07:04:54 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/1817
Author: @joshuaboniface
Created: 9/29/2019
Status: Merged
Merged: 9/29/2019
Merged by: @joshuaboniface

Base: masterHead: change-pragma-mode


📝 Commits (2)

  • 72edf5b Change PRAGMA mode from WAL to TRUNCATE
  • 9aec21f Nicer link format for comment

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 Emby.Server.Implementations/Data/BaseSqliteRepository.cs (+2 -2)

📄 Description

Changes
As-is, the WAL mode for SQLite3 has problems where the WAL isn't flushed properly, resulting in the file ballooning to massive sizes and filling up disks. Instead, we change to TRUNCATE mode. This mode (as per https://www.sqlite.org/pragma.html#pragma_journal_mode) uses a traditional journal which is flushed via a truncation (rather than file delete), which removes the WAL problems, preserving write journaling, while also not having any overhead for file deletion/creation to the system.

Issues
Fixes #1655


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/1817 **Author:** [@joshuaboniface](https://github.com/joshuaboniface) **Created:** 9/29/2019 **Status:** ✅ Merged **Merged:** 9/29/2019 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `master` ← **Head:** `change-pragma-mode` --- ### 📝 Commits (2) - [`72edf5b`](https://github.com/jellyfin/jellyfin/commit/72edf5b555cada453b25867612128e5273c7ce69) Change PRAGMA mode from WAL to TRUNCATE - [`9aec21f`](https://github.com/jellyfin/jellyfin/commit/9aec21f6b55334d818fade85d617077b387253cf) Nicer link format for comment ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Data/BaseSqliteRepository.cs` (+2 -2) </details> ### 📄 Description **Changes** As-is, the WAL mode for SQLite3 has problems where the WAL isn't flushed properly, resulting in the file ballooning to massive sizes and filling up disks. Instead, we change to TRUNCATE mode. This mode (as per https://www.sqlite.org/pragma.html#pragma_journal_mode) uses a traditional journal which is flushed via a truncation (rather than file delete), which removes the WAL problems, preserving write journaling, while also not having any overhead for file deletion/creation to the system. **Issues** Fixes #1655 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 07:04:54 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#8726
No description provided.