Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/omniwitness/monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ func main() {
// Open database with some flags:
// - use WAL mode as this allows for read concurrency while writes are happening.
// - set a busy_timeout so that sqlite will queue write transactions rather than immediately return ErrBusy
db, err := sql.Open("sqlite", fmt.Sprintf("%s?_journal_mode=WAL&_busy_timeout=1000", *dbFile))
// - set synchronous to FULL to ensure durability of commitments
db, err := sql.Open("sqlite", fmt.Sprintf("%s?_pragma=journal_mode(WAL)&_pragma=busy_timeout(1000)&_pragma=synchronous(FULL)", *dbFile))
if err != nil {
klog.Exitf("Failed to connect to DB: %v", err)
}
Expand Down
Loading