loopdb: make sqlite sync for extra durability

pull/712/head
Andras Banki-Horvath 2 months ago
parent ab30e0b4e8
commit 7fe4ee2f3b
No known key found for this signature in database
GPG Key ID: 80E5375C094198D8

@ -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…
Cancel
Save