Unverified 提交 5695b474 作者: Steven Allen 提交者: GitHub

Merge pull request #6611 from ipfs/doc/fixup-badger

doc: expand and cleanup badger documentation
...@@ -38,13 +38,13 @@ Uses a leveldb database to store key value pairs. ...@@ -38,13 +38,13 @@ Uses a leveldb database to store key value pairs.
## badgerds ## badgerds
Uses [badger](https://github.com/dgraph-io/badger) as a key value store. Uses [badger](https://github.com/dgraph-io/badger) as a key value store.
* `syncWrites`: Synchronize every write to disk. * `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 corrupted sector is found (otherwise Badger won't start). This option is always set to `true` in Windows if `syncWrites` is set. * `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 ```json
{ {
"type": "badgerds", "type": "badgerds",
"path": "<location of badger inside repo", "path": "<location of badger inside repo>",
"syncWrites": true|false, "syncWrites": true|false,
"truncate": true|false, "truncate": true|false,
} }
......
...@@ -507,27 +507,29 @@ See [Plugin docs](./plugins.md) ...@@ -507,27 +507,29 @@ See [Plugin docs](./plugins.md)
- [ ] More plugins and plugin types - [ ] More plugins and plugin types
- [ ] Feedback on stability - [ ] Feedback on stability
## Badger datastore ## Badger datastore
### In Version ### In Version
0.4.11
0.4.11
Badger-ds is new datastore implementation based on Badger-ds is new datastore implementation based on
https://github.com/dgraph-io/badger https://github.com/dgraph-io/badger.
### Basic Usage ### Basic Usage
``` ```
$ ipfs init --profile=badgerds $ ipfs init --profile=badgerds
``` ```
or install https://github.com/ipfs/ipfs-ds-convert/ and or install https://github.com/ipfs/ipfs-ds-convert/ and
``` ```
[BACKUP ~/.ipfs] [BACKUP ~/.ipfs]
$ ipfs config profile apply badgerds $ ipfs config profile apply badgerds
$ ipfs-ds-convert convert $ ipfs-ds-convert convert
``` ```
### You can read more in the [datastore](./datastores.md#badgerds) documentation.
### Road to being a real feature ### Road to being a real feature
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论