From d710b9ad4deabb3dced5598f121be9f70cce5ca4 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Tue, 13 May 2025 16:58:26 +0100 Subject: [PATCH] db: fix valuelogfilesize calc for some reason I thought it was in kibibytes? no, its in bytes as it should be. --- storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage.go b/storage.go index f9e503d..bab57a3 100644 --- a/storage.go +++ b/storage.go @@ -175,7 +175,8 @@ func generateLogActions(c *ini.File) map[string]DebugLogAction { func (app *appContext) ConnectDB() { opts := badgerhold.DefaultOptions - opts.Options.ValueLogFileSize = app.config.Section("advanced").Key("value_log_size").MustInt64(1024) * 1024 + // ValueLogFileSize is in bytes, so multiply by 1e6 + opts.Options.ValueLogFileSize = app.config.Section("advanced").Key("value_log_size").MustInt64(256) * 1e6 opts.Dir = app.storage.db_path opts.ValueDir = app.storage.db_path db, err := badgerhold.Open(opts)