BoltDB's accessors will return slices that are only valid for the
lifetime of the transaction. This adds copies where required to prevent
hard to debug crashes (among other things).
for storing batch keys and values in boltDBBatch.
NOTE: batch does not have to be safe for concurrent access. Delete may
be slow, but given it should not be used often, it's ok.
Fixes#3631
* libs/db: conditional compilation
For cleveldb: go build -tags cleveldb
For boltdb: go build -tags boltdb
Fixes#3611
* document db_backend param better
* remove deprecated LevelDBBackend
* update changelog
* add missing lines
* add new line
* fix TestRemoteDB
* add a line about boltdb tag
* Revert "remove deprecated LevelDBBackend"
This reverts commit 1aa85453f7.
* make PR non breaking
* change DEPRECATED label format
https://stackoverflow.com/a/36360323/820520
Description:
add boltdb implement for db interface.
The boltdb is safe and high performence embedded KV database. It is based on B+tree and Mmap.
Now it is maintained by etcd-io org. https://github.com/etcd-io/bbolt
It is much better than LSM tree (levelDB) when RANDOM and SCAN read.
Replaced #3604
Refs #1835
Commits:
* add boltdb for storage
* update boltdb in gopkg.toml
* update bbolt in Gopkg.lock
* dep update Gopkg.lock
* add boltdb'bucket when create Boltdb
* some modifies
* address my own comments
* fix most of the Iterator tests for boltdb
* bolt does not support concurrent writes while iterating
* add WARNING word
* note that ReadOnly option is not supported
* fixes after Ismail's review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* panic if View returns error
plus specify bucket in the top comment