Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.73k stars 445 forks source link

Change the WAL journal mode back to the default DELETE mode #8037

Closed kozlovsky closed 1 month ago

kozlovsky commented 1 month ago

This PR fixes #8035.

The WAL mode is persistent, so it is necessary to switch it to DELETE mode at least once (see https://www.sqlite.org/wal.html).

After that, it is not strictly necessary to execute PRAGMA journal_mode = DELETE again, but executing it is cheap and fast, and consistently executing it every time the connection is open avoids some potential future errors.