mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopdb: make sqlite sync for extra durability
This commit is contained in:
parent
ab30e0b4e8
commit
7fe4ee2f3b
1 changed files with 15 additions and 0 deletions
|
|
@ -68,6 +68,21 @@ func NewSqliteStore(cfg *SqliteConfig, network *chaincfg.Params) (*SqliteSwapSto
|
|||
name: "busy_timeout",
|
||||
value: "5000",
|
||||
},
|
||||
{
|
||||
// With the WAL mode, this ensures that we also do an
|
||||
// extra WAL sync after each transaction. The normal
|
||||
// sync mode skips this and gives better performance,
|
||||
// but risks durability.
|
||||
name: "synchronous",
|
||||
value: "full",
|
||||
},
|
||||
{
|
||||
// This is used to ensure proper durability for users
|
||||
// running on Mac OS. It uses the correct fsync system
|
||||
// call to ensure items are fully flushed to disk.
|
||||
name: "fullfsync",
|
||||
value: "true",
|
||||
},
|
||||
}
|
||||
sqliteOptions := make(url.Values)
|
||||
for _, option := range pragmaOptions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue