Skip to content

Commit

Permalink
Set go-sqlite3 tx lock type to IMMEDIATE
Browse files Browse the repository at this point in the history
Workaround for mattn/go-sqlite3#685

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Nov 8, 2024
1 parent 504d135 commit c17ab22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/drivers/sqlite/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewVariant(ctx context.Context, driverName string, cfg *drivers.Config) (se
if err := os.MkdirAll("./db", 0700); err != nil {
return nil, nil, err
}
dataSourceName = "./db/state.db?_journal=WAL&cache=shared&_busy_timeout=30000"
dataSourceName = "./db/state.db?_journal=WAL&cache=shared&_busy_timeout=30000&_txlock=immediate"
}

dialect, err := generic.Open(ctx, driverName, dataSourceName, cfg.ConnectionPoolConfig, "?", false, cfg.MetricsRegisterer)
Expand Down

0 comments on commit c17ab22

Please sign in to comment.