sqlite: do not use shared cache

SQLite developers consider it a misfeature [1], and after turning it on,
we saw a new set of flakes.  Let's turn it off and trust the developers
[1] that WAL mode is sufficient for our purposes.

Turning the shared cache off also makes the DB smaller and faster.

[NO NEW TESTS NEEDED]

[1] https://sqlite.org/forum/forumpost/1f291cdca4

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-03-22 13:56:08 +01:00
parent 6b9f3140fa
commit b31d9e15f2

View File

@ -38,8 +38,6 @@ const (
sqliteOptionSynchronous = "&_sync=FULL"
// Allow foreign keys (https://www.sqlite.org/pragma.html#pragma_foreign_keys).
sqliteOptionForeignKeys = "&_foreign_keys=1"
// Enable cache sharing for threads within a process
sqliteOptionSharedCache = "&cache=shared"
// Make sure that transactions happen exclusively.
sqliteOptionTXLock = "&_txlock=exclusive"
@ -49,7 +47,6 @@ const (
sqliteOptionJournal +
sqliteOptionSynchronous +
sqliteOptionForeignKeys +
sqliteOptionSharedCache +
sqliteOptionTXLock
)