Skip to content

Commit

Permalink
crypto/helper: use sqlite3-fk-wal by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 2, 2025
1 parent c7cb9ff commit 006bbe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/cryptohelper/cryptohelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/rs/zerolog"
"go.mau.fi/util/dbutil"
_ "go.mau.fi/util/dbutil/litestream"

"maunium.net/go/mautrix"
"maunium.net/go/mautrix/crypto"
Expand Down Expand Up @@ -78,7 +79,7 @@ func NewCryptoHelper(cli *mautrix.Client, pickleKey []byte, store any) (*CryptoH
}
unmanagedCryptoStore = typedStore
case string:
db, err := dbutil.NewWithDialect(typedStore, "sqlite3")
db, err := dbutil.NewWithDialect(fmt.Sprintf("file:%s?_txlock=immediate", typedStore), "sqlite3-fk-wal")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 006bbe2

Please sign in to comment.