From b31d9e15f29d4246eb8925b37f62290c2fc3d9d7 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 22 Mar 2023 13:56:08 +0100 Subject: [PATCH] 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 --- libpod/sqlite_state.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/libpod/sqlite_state.go b/libpod/sqlite_state.go index e1007dbc37..9027083ddc 100644 --- a/libpod/sqlite_state.go +++ b/libpod/sqlite_state.go @@ -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 )