From 92594db98759910cff5454c08361cf78070fcdd6 Mon Sep 17 00:00:00 2001 From: Edoardo Spadolini Date: Wed, 23 Mar 2022 17:40:04 +0100 Subject: [PATCH] Default to synchronous FULL for sqlite Helps with robustness, and clusters so big that the auth backend performance will be affected by this change are also so big that they should've probably been using etcd/dynamo already anyway. --- lib/backend/lite/lite.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/backend/lite/lite.go b/lib/backend/lite/lite.go index 49ac382b7730a..637479ed619ae 100644 --- a/lib/backend/lite/lite.go +++ b/lib/backend/lite/lite.go @@ -45,8 +45,6 @@ const ( // AlternativeName is another name of this backend. AlternativeName = "dir" - // SyncOff disables file system sync after writing. - SyncOff = "OFF" // SyncFull fsyncs the database file on disk after every write. SyncFull = "FULL" @@ -66,7 +64,7 @@ const ( slowTransactionThreshold = time.Second // defaultSync is the default value for Sync - defaultSync = SyncOff + defaultSync = SyncFull // defaultBusyTimeout is the default value for BusyTimeout, in ms defaultBusyTimeout = 10000