From 200df850ccc2c747f75acf9d06b00230d2f72c98 Mon Sep 17 00:00:00 2001 From: Lucas Molas Date: Mon, 22 Oct 2018 09:17:18 -0300 Subject: [PATCH] badger: add truncate flag License: MIT Signed-off-by: Lucas Molas --- docs/datastores.md | 6 +++++- plugin/plugins/badgerds/badgerds.go | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/datastores.md b/docs/datastores.md index 669ffa615..bec26c649 100644 --- a/docs/datastores.md +++ b/docs/datastores.md @@ -38,11 +38,15 @@ Uses a leveldb database to store key value pairs. ## badgerds Uses [badger](https://github.com/dgraph-io/badger) as a key value store. +* `syncWrites`: Synchronize every write to disk. +* `truncate`: Truncate the DB if a corrupted sector is found (otherwise Badger won't start). This option is always set to `true` in Windows if `syncWrites` is set. + ```json { "type": "badgerds", "path": "