From d600378094585e7df9652ee5649d5bccc5f8ed1b Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 28 Aug 2019 13:43:39 -0700 Subject: [PATCH] doc: expand and cleanup badger documentation --- docs/datastores.md | 6 +++--- docs/experimental-features.md | 34 ++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/docs/datastores.md b/docs/datastores.md index bec26c649..0bab1a7e2 100644 --- a/docs/datastores.md +++ b/docs/datastores.md @@ -38,13 +38,13 @@ 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. +* `syncWrites`: Flush every write to disk before continuing. Disabling this option may leave your datastore in an inconsistent state after a crash. +* `truncate`: Truncate the DB if a partially written sector is found (defaults to true). This only happens if a IPFS crashes half-way through a write so this option is usually safe to leave on. ```json { "type": "badgerds", - "path": "", "syncWrites": true|false, "truncate": true|false, } diff --git a/docs/experimental-features.md b/docs/experimental-features.md index 788ff5f03..f7121850e 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -507,27 +507,29 @@ See [Plugin docs](./plugins.md) - [ ] More plugins and plugin types - [ ] Feedback on stability - ## Badger datastore +## Badger datastore - ### In Version - 0.4.11 +### In Version - Badger-ds is new datastore implementation based on - https://github.com/dgraph-io/badger +0.4.11 - ### Basic Usage +Badger-ds is new datastore implementation based on +https://github.com/dgraph-io/badger. + - ``` - $ ipfs init --profile=badgerds - ``` - or install https://github.com/ipfs/ipfs-ds-convert/ and - ``` - [BACKUP ~/.ipfs] - $ ipfs config profile apply badgerds - $ ipfs-ds-convert convert - ``` +### Basic Usage -### +``` +$ ipfs init --profile=badgerds +``` +or install https://github.com/ipfs/ipfs-ds-convert/ and +``` +[BACKUP ~/.ipfs] +$ ipfs config profile apply badgerds +$ ipfs-ds-convert convert +``` + +You can read more in the [datastore](./datastores.md#badgerds) documentation. ### Road to being a real feature