Merge branch 'main' into golangci-lint-upgrade

This commit is contained in:
Markus Unterwaditzer 2024-10-14 14:12:48 +02:00 committed by GitHub
commit 8ccff37525
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 16223 additions and 15320 deletions

View file

@ -402,6 +402,18 @@ func maxOpenConns() int {
if multiplier < 1 {
return 1
}
// Specifically for SQLite databases with
// a journal mode of anything EXCEPT "wal",
// only 1 concurrent connection is supported.
if strings.ToLower(config.GetDbType()) == "sqlite" {
journalMode := config.GetDbSqliteJournalMode()
journalMode = strings.ToLower(journalMode)
if journalMode != "wal" {
return 1
}
}
return multiplier * runtime.GOMAXPROCS(0)
}