Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate boltdb and cleveldb #153

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Deprecate boltdb and cleveldb. If you're using either of those, please reach
out ([\#153](https://github.com/cometbft/cometbft-db/pull/153))
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Go 1.22+
sets, and tests. Used for [IAVL](https://github.com/tendermint/iavl) working
sets when the pruning strategy allows it.

- **[LevelDB](https://github.com/google/leveldb) [experimental]:** A [Go
- **[LevelDB](https://github.com/google/leveldb) [DEPRECATED]:** A [Go
wrapper](https://github.com/jmhodges/levigo) around
[LevelDB](https://github.com/google/leveldb). Uses LSM-trees for on-disk
storage, which have good performance for write-heavy workloads, particularly
on spinning disks, but requires periodic compaction to maintain decent read
performance and reclaim disk space. Does not support transactions.

- **[BoltDB](https://github.com/etcd-io/bbolt) [experimental]:** A
- **[BoltDB](https://github.com/etcd-io/bbolt) [DEPRECATED]:** A
[fork](https://github.com/etcd-io/bbolt) of
[BoltDB](https://github.com/boltdb/bolt). Uses B+trees for on-disk storage,
which have good performance for read-heavy workloads and range scans. Supports
Expand Down
2 changes: 2 additions & 0 deletions boltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type BoltDB struct {
var _ DB = (*BoltDB)(nil)

// NewBoltDB returns a BoltDB with default options.
//
// Deprecated: boltdb is deprecated and will be removed in the future.
func NewBoltDB(name, dir string) (DB, error) {
return NewBoltDBWithOpts(name, dir, bbolt.DefaultOptions)
}
Expand Down
2 changes: 2 additions & 0 deletions cleveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type CLevelDB struct {
var _ DB = (*CLevelDB)(nil)

// NewCLevelDB creates a new CLevelDB.
//
// Deprecated: cleveldb is deprecated and will be removed in the future.
func NewCLevelDB(name string, dir string) (*CLevelDB, error) {
dbPath := filepath.Join(dir, name+".db")

Expand Down
Loading