From 006bbe28068db1e60465e94b30980677fbd8508c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 2 Mar 2025 18:41:18 +0200 Subject: [PATCH] crypto/helper: use sqlite3-fk-wal by default --- crypto/cryptohelper/cryptohelper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/cryptohelper/cryptohelper.go b/crypto/cryptohelper/cryptohelper.go index 1b0e08e1..f03835ef 100644 --- a/crypto/cryptohelper/cryptohelper.go +++ b/crypto/cryptohelper/cryptohelper.go @@ -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" @@ -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 }