@cryptotaxi247 / kubo / commits / d60037809

doc: expand and cleanup badger documentation

Steven Allen committed Aug 28, 2019 at 13:43 UTC d600378094585e7df9652ee5649d5bccc5f8ed1b
2 files changed +21 -19
docs/datastores.md
+3 -3
@@ -38,13 +38,13 @@ Uses a leveldb database to store key value pairs.
38 ## badgerds
39 Uses [badger](https://github.com/dgraph-io/badger) as a key value store.
40
41 -* `syncWrites`: Synchronize every write to disk.
42 -* `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.
41 +* `syncWrites`: Flush every write to disk before continuing. Disabling this option may leave your datastore in an inconsistent state after a crash.
42 +* `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.
43
44 ```json
45 {
46 "type": "badgerds",
47 - "path": "<location of badger inside repo",
47 + "path": "<location of badger inside repo>",
48 "syncWrites": true|false,
49 "truncate": true|false,
50 }
docs/experimental-features.md
+18 -16
@@ -507,27 +507,29 @@ See [Plugin docs](./plugins.md)
507 - [ ] More plugins and plugin types
508 - [ ] Feedback on stability
509
510 - ## Badger datastore
510 +## Badger datastore
511
512 - ### In Version
513 - 0.4.11
512 +### In Version
513 +
514 +0.4.11
515
515 - Badger-ds is new datastore implementation based on
516 - https://github.com/dgraph-io/badger
516 +Badger-ds is new datastore implementation based on
517 +https://github.com/dgraph-io/badger.
518 +
519
518 - ### Basic Usage
520 +### Basic Usage
521
520 - ```
521 - $ ipfs init --profile=badgerds
522 - ```
523 - or install https://github.com/ipfs/ipfs-ds-convert/ and
524 - ```
525 - [BACKUP ~/.ipfs]
526 - $ ipfs config profile apply badgerds
527 - $ ipfs-ds-convert convert
528 - ```
522 +```
523 +$ ipfs init --profile=badgerds
524 +```
525 +or install https://github.com/ipfs/ipfs-ds-convert/ and
526 +```
527 +[BACKUP ~/.ipfs]
528 +$ ipfs config profile apply badgerds
529 +$ ipfs-ds-convert convert
530 +```
531
530 -###
532 +You can read more in the [datastore](./datastores.md#badgerds) documentation.
533
534 ### Road to being a real feature
535