Browse Source

docs/guides: specify a fix for badger err on Windows (#3974)

* Added badger error for Windows

* Update go-built-in.md

* Update docs/guides/go-built-in.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update docs/guides/go.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

When restarting the app, it throws an error saying that it requires truncation of badger value log because it is corrupted. This seems to be an issue with badger DB and it is reported here. It solves the problem when you set the truncate value to true, but this obviously results in loss of data. I am not sure if this is a concern or not. However, it'd great if this could be documented for Windows users!

Fixes #3954
pull/3980/head
Shivani Joshi 5 years ago
committed by Anton Kaliaev
parent
commit
961e1d360f
2 changed files with 12 additions and 0 deletions
  1. +6
    -0
      docs/guides/go-built-in.md
  2. +6
    -0
      docs/guides/go.md

+ 6
- 0
docs/guides/go-built-in.md View File

@ -448,6 +448,12 @@ defer db.Close()
app := NewKVStoreApplication(db)
```
For **Windows** users, restarting this app will make badger throw an error as it requires value log to be truncated. For more information on this, visit [here](https://github.com/dgraph-io/badger/issues/744).
This can be avoided by setting the truncate option to true, like this:
```go
db, err := badger.Open(badger.DefaultOptions("/tmp/badger").WithTruncate(true))
```
Then we use it to create a Tendermint Core `Node` instance:
```go


+ 6
- 0
docs/guides/go.md View File

@ -388,6 +388,12 @@ defer db.Close()
app := NewKVStoreApplication(db)
```
For **Windows** users, restarting this app will make badger throw an error as it requires value log to be truncated. For more information on this, visit [here](https://github.com/dgraph-io/badger/issues/744).
This can be avoided by setting the truncate option to true, like this:
```go
db, err := badger.Open(badger.DefaultOptions("/tmp/badger").WithTruncate(true))
```
Then we start the ABCI server and add some signal handling to gracefully stop
it upon receiving SIGTERM or Ctrl-C. Tendermint Core will act as a client,
which connects to our server and send us transactions and other messages.


Loading…
Cancel
Save