Skip to content

Commit

Permalink
feat: remove build tag for pebbledb
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 22, 2024
1 parent ddc3f09 commit 5a33ca2
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 489 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## UNRELEASED
## [v1.1.0] - 2024-11-22

* Allow full control in rocksdb opening
* Make `Iteractor` and `Batch` interfaces more flexible by a type alias
* Remove alias for PebbleDB

## [v1.0.2] - 2024-02-26

Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@ all: lint test
## By default this will only test memdb, goleveldb, and pebbledb, which do not require cgo
test:
@echo "--> Running go test"
@go test $(PACKAGES) -tags pebbledb -v
@go test $(PACKAGES) -v

test-rocksdb:
@echo "--> Running go test"
@go test $(PACKAGES) -tags rocksdb -v

test-pebble:
@echo "--> Running go test"
@go test $(PACKAGES) -tags pebbledb -v


test-all:
@echo "--> Running go test"
@go test $(PACKAGES) -tags rocksdb,pebbledb -v

golangci_version=v1.55.0

#? lint-install: Install golangci-lint
Expand Down
7 changes: 3 additions & 4 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ const (
// MemDBBackend represents in-memory key value store, which is mostly used
// for testing.
MemDBBackend BackendType = "memdb"
// PebbleDBDBBackend represents pebble (uses github.com/cockroachdb/pebble)
// - pure go
PebbleDBBackend BackendType = "pebbledb"
// RocksDBBackend represents rocksdb (uses github.com/linxGnu/grocksdb)
// - requires gcc
// - use rocksdb build tag (go build -tags rocksdb)
RocksDBBackend BackendType = "rocksdb"
// PebbleDBDBBackend represents pebble (uses github.com/cockroachdb/pebble)
// - pure go
// - use pebble build tag (go build -tags pebbledb)
PebbleDBBackend BackendType = "pebbledb"
)

type (
Expand Down
46 changes: 24 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
module github.com/cosmos/cosmos-db

go 1.19
go 1.22.0

toolchain go1.23.1

require (
github.com/cockroachdb/pebble v1.1.0
github.com/google/btree v1.1.2
github.com/linxGnu/grocksdb v1.8.12
github.com/spf13/cast v1.6.0
github.com/stretchr/testify v1.8.4
github.com/cockroachdb/pebble v1.1.2
github.com/google/btree v1.1.3
github.com/linxGnu/grocksdb v1.9.7
github.com/spf13/cast v1.7.0
github.com/stretchr/testify v1.9.0
// Pinned to this version to avoid bugs in following commits. See https://github.com/cosmos/cosmos-sdk/pull/14952
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/DataDog/zstd v1.5.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/getsentry/sentry-go v0.29.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.0 // indirect
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 5a33ca2

Please sign in to comment.