mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
sqlite: disable WAL mode
As shown in #17831, WAL mode plays a role in causing `database is locked` errors. Those are errors, in theory, should not happen as the DB should busy wait. mattn/go-sqlite3/issues/274 has some comments indicating that the busy handler behaves differently in WAL mode which may be an explanation to the error. For now, let's disable WAL mode and only re-enable it when we have clearer understanding of what's going on. The upstream issue along with the SQLite documentation do not give me the clear guidance that I would need. [NO NEW TESTS NEEDED] - flake is only reproducible in CI. Fixes: #18356 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -32,9 +32,7 @@ type SQLiteState struct {
|
||||
const (
|
||||
// Deal with timezone automatically.
|
||||
sqliteOptionLocation = "_loc=auto"
|
||||
// Set the journal mode (https://www.sqlite.org/pragma.html#pragma_journal_mode).
|
||||
sqliteOptionJournal = "&_journal=WAL"
|
||||
// Force WAL mode to fsync after each transaction (https://www.sqlite.org/pragma.html#pragma_synchronous).
|
||||
// Force an fsync after each transaction (https://www.sqlite.org/pragma.html#pragma_synchronous).
|
||||
sqliteOptionSynchronous = "&_sync=FULL"
|
||||
// Allow foreign keys (https://www.sqlite.org/pragma.html#pragma_foreign_keys).
|
||||
sqliteOptionForeignKeys = "&_foreign_keys=1"
|
||||
@ -44,7 +42,6 @@ const (
|
||||
// Assembled sqlite options used when opening the database.
|
||||
sqliteOptions = "db.sql?" +
|
||||
sqliteOptionLocation +
|
||||
sqliteOptionJournal +
|
||||
sqliteOptionSynchronous +
|
||||
sqliteOptionForeignKeys +
|
||||
sqliteOptionTXLock
|
||||
|
Reference in New Issue
Block a user