[PR #1985] [MERGED] Make write-ahead-log default and configurable for sqlite #2433

Closed
opened 2025-12-29 03:21:16 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1985
Author: @kradalby
Created: 6/20/2024
Status: Merged
Merged: 6/23/2024
Merged by: @kradalby

Base: mainHead: kradalby/sqlite-wal


📝 Commits (2)

  • a870ec9 correctly enable WAL log for sqlite
  • e16708f update changelog

📊 Changes

4 files changed (+28 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 config-example.yaml (+4 -0)
📝 hscontrol/db/db.go (+18 -2)
📝 hscontrol/types/config.go (+5 -1)

📄 Description

this commit makes headscale correctly enable write-ahead-log for sqlite and adds an option to turn it on and off.

WAL is enabled by default and should make sqlite perform a lot better, even further eliminating the need to use postgres.

It also adds a couple of other useful defaults.

Note, this PR removes WAL from the sqlite connection string, as that did not have any effect with the sqlite driver we use.

Fixes #1983


🔄 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/juanfont/headscale/pull/1985 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 6/23/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/sqlite-wal` --- ### 📝 Commits (2) - [`a870ec9`](https://github.com/juanfont/headscale/commit/a870ec9ce6d98cd9a5fa3be9a25647aadb6ed422) correctly enable WAL log for sqlite - [`e16708f`](https://github.com/juanfont/headscale/commit/e16708fb01ab08ad1148e76c0e0a6faeae40a3bc) update changelog ### 📊 Changes **4 files changed** (+28 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `config-example.yaml` (+4 -0) 📝 `hscontrol/db/db.go` (+18 -2) 📝 `hscontrol/types/config.go` (+5 -1) </details> ### 📄 Description this commit makes headscale correctly enable write-ahead-log for sqlite and adds an option to turn it on and off. WAL is enabled by default and should make sqlite perform a lot better, even further eliminating the need to use postgres. It also adds a couple of other useful defaults. Note, this PR removes WAL from the sqlite connection string, as that did not have any effect with the sqlite driver we use. Fixes #1983 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:21:16 +01:00
adam closed this issue 2025-12-29 03:21:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2433