db: add max vlog size setting

This commit is contained in:
Harvey Tindall
2025-05-13 14:01:41 +01:00
parent 58c2fa3dde
commit c5f4098b5b
3 changed files with 16 additions and 0 deletions
+1
View File
@@ -175,6 +175,7 @@ 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
opts.Dir = app.storage.db_path
opts.ValueDir = app.storage.db_path
db, err := badgerhold.Open(opts)