Skip to content

Commit

Permalink
Merge pull request #6611 from ipfs/doc/fixup-badger
Browse files Browse the repository at this point in the history
doc: expand and cleanup badger documentation
  • Loading branch information
Stebalien authored Aug 28, 2019
2 parents ad4f02c + d600378 commit 5695b47
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
6 changes: 3 additions & 3 deletions docs/datastores.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<location of badger inside repo",
"path": "<location of badger inside repo>",
"syncWrites": true|false,
"truncate": true|false,
}
Expand Down
34 changes: 18 additions & 16 deletions docs/experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0.4.11

Badger-ds is new datastore implementation based on
https://github.com/dgraph-io/badger
Badger-ds is new datastore implementation based on
https://github.com/dgraph-io/badger.


### Basic Usage
### 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
```
```
$ 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

Expand Down

0 comments on commit 5695b47

Please sign in to comment.