db: fix valuelogfilesize calc

for some reason I thought it was in kibibytes? no, its in bytes as it
    should be.
This commit is contained in:
Harvey Tindall
2025-05-13 16:58:26 +01:00
parent 5cc97eaf17
commit d710b9ad4d
+2 -1
View File
@@ -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)