pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.34k stars 187 forks source link

Make WAL mode for pihole-FTL.db optional #1868

Closed DL6ER closed 4 months ago

DL6ER commented 5 months ago

What does this implement/fix?

Add new config option database.useWAL defaulting to true making the use of the WAL journal optional for the on-disk query database. Reasons why this might be useful are given in the description of the new config option:

Should FTL enable Write-Ahead Log (WAL) mode for the on-disk query database (configured via files.database)? It is recommended to leave this setting enabled for performance reasons. About the only reason to disable WAL mode is if you are experiencing specific issues with it, e.g., when using a database that is accessed from multiple hosts via a network share. When this setting is disabled, FTL will use SQLite3's default journal mode (rollback journal in DELETE mode).

This PR was initially triggered by this Discourse thread, however, by now I think that WAL wasn't the issue here but specific user configuration I had not noticed before in the debug log.


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

pralor-bot commented 4 months ago

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/no-query-log-update-anymore-and-no-top-clients-all-and-blocked/67929/32