mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #20838 from Luap99/sqlite-timeout
sqlite: set busy timeout to 100s
This commit is contained in:
@ -40,13 +40,17 @@ const (
|
|||||||
sqliteOptionForeignKeys = "&_foreign_keys=1"
|
sqliteOptionForeignKeys = "&_foreign_keys=1"
|
||||||
// Make sure that transactions happen exclusively.
|
// Make sure that transactions happen exclusively.
|
||||||
sqliteOptionTXLock = "&_txlock=exclusive"
|
sqliteOptionTXLock = "&_txlock=exclusive"
|
||||||
|
// Make sure busy timeout is set to high value to keep retying when the db is locked.
|
||||||
|
// Timeout is in ms, so set it to 100s to have enough time to retry the operations.
|
||||||
|
sqliteOptionBusyTimeout = "&_busy_timeout=100000"
|
||||||
|
|
||||||
// Assembled sqlite options used when opening the database.
|
// Assembled sqlite options used when opening the database.
|
||||||
sqliteOptions = "db.sql?" +
|
sqliteOptions = "db.sql?" +
|
||||||
sqliteOptionLocation +
|
sqliteOptionLocation +
|
||||||
sqliteOptionSynchronous +
|
sqliteOptionSynchronous +
|
||||||
sqliteOptionForeignKeys +
|
sqliteOptionForeignKeys +
|
||||||
sqliteOptionTXLock
|
sqliteOptionTXLock +
|
||||||
|
sqliteOptionBusyTimeout
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewSqliteState creates a new SQLite-backed state database.
|
// NewSqliteState creates a new SQLite-backed state database.
|
||||||
|
Reference in New Issue
Block a user