Closed fjl closed 7 years ago
Probably related as this produces the same runtime error:
package main
import (
"github.com/dgraph-io/badger/badger"
)
func main() {
kv := badger.NewKV(&badger.DefaultOptions)
kv.BatchSet([]*badger.Entry{})
kv.Close()
}
Thanks for reporting. Will look at it first thing tomorrow.
I'll try avoiding the call to BatchSet
if length is zero.
Thanks for the code, @igm. I just pushed a fix to master. You can try it out now @fjl.
It doesn't crash anymore.
Eager to hear your experience with Badger + Ethereum. I'll try and run it as well.
Running it. It seems a bit slow.. I think there might not be enough batching going on. I'd create batches of 1000 entries each to speed it up.
I get this crash when running my program, which embeds badger @ bc04380.
To reproduce:
geth
is a client for the Ethereum cryptocurrency network and is probably a really good smoke test for your KV store because it's RW heavy. When you run it, blockchain data will be downloaded from the p2p network and stored in badger (at least that's what should happen, it doesn't really though because of the crash). The commit that adds experimental support for badger is https://github.com/fjl/go-ethereum/commit/a7f7238c3f91f43e7f357aead60617091db74f76.