diff --git a/.github/workflows/ci-badger-bank-tests-nightly.yml b/.github/workflows/ci-badger-bank-tests-nightly.yml index dad19388a..c30f1b72c 100644 --- a/.github/workflows/ci-badger-bank-tests-nightly.yml +++ b/.github/workflows/ci-badger-bank-tests-nightly.yml @@ -3,8 +3,7 @@ on: push: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' schedule: - cron: "0 3 * * *" jobs: diff --git a/.github/workflows/ci-badger-bank-tests.yml b/.github/workflows/ci-badger-bank-tests.yml index 9eb50b111..9728db5bd 100644 --- a/.github/workflows/ci-badger-bank-tests.yml +++ b/.github/workflows/ci-badger-bank-tests.yml @@ -3,13 +3,11 @@ on: push: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' pull_request: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' schedule: - cron: "*/30 * * * *" jobs: diff --git a/.github/workflows/ci-badger-tests.yml b/.github/workflows/ci-badger-tests.yml index 7b9e8a007..2f9668641 100644 --- a/.github/workflows/ci-badger-tests.yml +++ b/.github/workflows/ci-badger-tests.yml @@ -3,13 +3,11 @@ on: push: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' pull_request: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' schedule: - cron: "*/30 * * * *" jobs: diff --git a/.github/workflows/ci-golang-lint.yml b/.github/workflows/ci-golang-lint.yml index 5291ed467..b3d2647a2 100644 --- a/.github/workflows/ci-golang-lint.yml +++ b/.github/workflows/ci-golang-lint.yml @@ -3,13 +3,11 @@ on: push: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' pull_request: branches: - main - - release/v3.2103 - - release/v4.0 + - 'release/v*' schedule: - cron: "*/30 * * * *" jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6398950..282c8e8a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [3.3.0] - 2022-02-23 +## [4.0.0] - 2023-02-24 -This minor release fixes a bug in the maxHeaderSize parameter that could lead +This release fixes a bug in the maxHeaderSize parameter that could lead to panics. We introduce an external magic number to keep track of external dependencies. We bump up the minimum required Go version to 1.19. No changes -were made to the format of data on disk. +were made to the format of data on disk. This is a major release because +we are making a switch to SemVer in order to make it easier for the community +to understand when breaking API and data format changes are made. ### Fixed - fix: update maxHeaderSize #1877 @@ -19,7 +21,8 @@ were made to the format of data on disk. - upgrade go to 1.19 #1868 - enable linters (gosimple, govet, lll, unused, staticcheck, errcheck, ineffassign, gofmt) #1871 #1870 #1876 - remove dependency on io/ioutil #1879 -- various doc and comment fixes #1857 +- various doc and comment fixes #1857 +- moving from CalVer to SemVer ## [3.2103.5] - 2022-12-15 diff --git a/README.md b/README.md index 849494127..197e9b76e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BadgerDB -[![Go Reference](https://pkg.go.dev/badge/github.com/dgraph-io/badger/v3.svg)](https://pkg.go.dev/github.com/dgraph-io/badger/v3) -[![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger/v3)](https://goreportcard.com/report/github.com/dgraph-io/badger/v3) +[![Go Reference](https://pkg.go.dev/badge/github.com/dgraph-io/badger/v4.svg)](https://pkg.go.dev/github.com/dgraph-io/badger/v4) +[![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger/v4)](https://goreportcard.com/report/github.com/dgraph-io/badger/v4) [![Sourcegraph](https://sourcegraph.com/github.com/dgraph-io/badger/-/badge.svg)](https://sourcegraph.com/github.com/dgraph-io/badger?badge) [![ci-badger-tests](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-tests.yml/badge.svg)](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-tests.yml) [![ci-badger-bank-tests](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-bank-tests.yml/badge.svg)](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-bank-tests.yml) @@ -65,7 +65,7 @@ For more details on our version naming schema please read [Choosing a version](# To start using Badger, install Go 1.19 or above. Badger v3 needs go modules. From your project, run the following command ```sh -$ go get github.com/dgraph-io/badger/v3 +$ go get github.com/dgraph-io/badger/v4 ``` This will retrieve the library. diff --git a/backup.go b/backup.go index fcc8a1086..f9629064f 100644 --- a/backup.go +++ b/backup.go @@ -26,8 +26,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/backup_test.go b/backup_test.go index 5b114dcd7..3d7b15a6a 100644 --- a/backup_test.go +++ b/backup_test.go @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" ) func TestBackupRestore1(t *testing.T) { diff --git a/badger/cmd/backup.go b/badger/cmd/backup.go index 9e10a1cc3..563d8f752 100644 --- a/badger/cmd/backup.go +++ b/badger/cmd/backup.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" + "github.com/dgraph-io/badger/v4" ) var bo = struct { diff --git a/badger/cmd/bank.go b/badger/cmd/bank.go index 9b07d698c..07b2e2564 100644 --- a/badger/cmd/bank.go +++ b/badger/cmd/bank.go @@ -32,9 +32,9 @@ import ( "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/badger/cmd/flatten.go b/badger/cmd/flatten.go index 7fbfc6386..dc3481815 100644 --- a/badger/cmd/flatten.go +++ b/badger/cmd/flatten.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/options" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/options" ) var flattenCmd = &cobra.Command{ diff --git a/badger/cmd/info.go b/badger/cmd/info.go index e313caad8..59d1966ba 100644 --- a/badger/cmd/info.go +++ b/badger/cmd/info.go @@ -31,10 +31,10 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) type flagOptions struct { diff --git a/badger/cmd/pick_table_bench.go b/badger/cmd/pick_table_bench.go index af26bdbd2..d4d2d2878 100644 --- a/badger/cmd/pick_table_bench.go +++ b/badger/cmd/pick_table_bench.go @@ -26,10 +26,10 @@ import ( "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) var pickBenchCmd = &cobra.Command{ diff --git a/badger/cmd/read_bench.go b/badger/cmd/read_bench.go index 3fb251365..8cf538ed1 100644 --- a/badger/cmd/read_bench.go +++ b/badger/cmd/read_bench.go @@ -28,9 +28,9 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/badger/cmd/restore.go b/badger/cmd/restore.go index 8fe08845b..8d6b69046 100644 --- a/badger/cmd/restore.go +++ b/badger/cmd/restore.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" + "github.com/dgraph-io/badger/v4" ) var restoreFile string diff --git a/badger/cmd/rotate.go b/badger/cmd/rotate.go index 4f46f9e52..1b76cbf41 100644 --- a/badger/cmd/rotate.go +++ b/badger/cmd/rotate.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" + "github.com/dgraph-io/badger/v4" ) var oldKeyPath string diff --git a/badger/cmd/rotate_test.go b/badger/cmd/rotate_test.go index 10095f4f8..805ef201a 100644 --- a/badger/cmd/rotate_test.go +++ b/badger/cmd/rotate_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/y" ) func TestRotate(t *testing.T) { diff --git a/badger/cmd/stream.go b/badger/cmd/stream.go index a7d64f15f..98f1efd0c 100644 --- a/badger/cmd/stream.go +++ b/badger/cmd/stream.go @@ -25,9 +25,9 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/y" ) var streamCmd = &cobra.Command{ diff --git a/badger/cmd/write_bench.go b/badger/cmd/write_bench.go index 64d596e14..7b42459fe 100644 --- a/badger/cmd/write_bench.go +++ b/badger/cmd/write_bench.go @@ -32,10 +32,10 @@ import ( humanize "github.com/dustin/go-humanize" "github.com/spf13/cobra" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/badger/main.go b/badger/main.go index 0f3d154f3..82779f381 100644 --- a/badger/main.go +++ b/badger/main.go @@ -25,7 +25,7 @@ import ( "github.com/dustin/go-humanize" "go.opencensus.io/zpages" - "github.com/dgraph-io/badger/v3/badger/cmd" + "github.com/dgraph-io/badger/v4/badger/cmd" "github.com/dgraph-io/ristretto/z" ) diff --git a/batch.go b/batch.go index e566e2526..885451fe9 100644 --- a/batch.go +++ b/batch.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/batch_test.go b/batch_test.go index 21e1a18d3..d2dc01f37 100644 --- a/batch_test.go +++ b/batch_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) func TestWriteBatch(t *testing.T) { diff --git a/compaction.go b/compaction.go index 1a0f228ef..1f61ecfe6 100644 --- a/compaction.go +++ b/compaction.go @@ -23,8 +23,8 @@ import ( "math" "sync" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) type keyRange struct { diff --git a/db.go b/db.go index ff9276ca0..fee0481c8 100644 --- a/db.go +++ b/db.go @@ -34,11 +34,11 @@ import ( humanize "github.com/dustin/go-humanize" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/skl" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/skl" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto" "github.com/dgraph-io/ristretto/z" ) diff --git a/db2_test.go b/db2_test.go index 64605e156..4474d51dc 100644 --- a/db2_test.go +++ b/db2_test.go @@ -35,10 +35,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/db_test.go b/db_test.go index c703b0344..660b71919 100644 --- a/db_test.go +++ b/db_test.go @@ -34,9 +34,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/dir_plan9.go b/dir_plan9.go index a4ab4a137..7f7f194bc 100644 --- a/dir_plan9.go +++ b/dir_plan9.go @@ -22,7 +22,7 @@ import ( "path/filepath" "strings" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) // directoryLockGuard holds a lock on a directory and a pid file inside. The pid file isn't part diff --git a/dir_unix.go b/dir_unix.go index f4d8a18d4..ecaa5ced7 100644 --- a/dir_unix.go +++ b/dir_unix.go @@ -26,7 +26,7 @@ import ( "golang.org/x/sys/unix" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) // directoryLockGuard holds a lock on a directory and a pid file inside. The pid file isn't part diff --git a/dir_windows.go b/dir_windows.go index d57c392ca..bd8d2f9d2 100644 --- a/dir_windows.go +++ b/dir_windows.go @@ -25,7 +25,7 @@ import ( "path/filepath" "syscall" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) // FILE_ATTRIBUTE_TEMPORARY - A file that is being used for temporary storage. diff --git a/discard.go b/discard.go index ef8d12f95..b66c411cf 100644 --- a/discard.go +++ b/discard.go @@ -23,7 +23,7 @@ import ( "sort" "sync" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/docs/content/get-started/index.md b/docs/content/get-started/index.md index 4db43e609..9c5f198af 100644 --- a/docs/content/get-started/index.md +++ b/docs/content/get-started/index.md @@ -8,7 +8,7 @@ aliases = ["/get-started"] To start using Badger, install Go 1.19 or above. Badger v2 needs go modules. Run the following command to retrieve the library. ```sh -$ go get github.com/dgraph-io/badger/v3 +$ go get github.com/dgraph-io/badger/v4 ``` This will retrieve the library. @@ -60,7 +60,7 @@ package main import ( "log" - badger "github.com/dgraph-io/badger/v3" + badger "github.com/dgraph-io/badger/v4" ) func main() { diff --git a/go.mod b/go.mod index 440b09ab1..4756a4e85 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/dgraph-io/badger/v3 +module github.com/dgraph-io/badger/v4 go 1.19 diff --git a/integration/testgc/main.go b/integration/testgc/main.go index 04027db7b..2e5a1c588 100644 --- a/integration/testgc/main.go +++ b/integration/testgc/main.go @@ -12,8 +12,8 @@ import ( "sync/atomic" "time" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/iterator.go b/iterator.go index 604140d9b..c56259881 100644 --- a/iterator.go +++ b/iterator.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/iterator_test.go b/iterator_test.go index c4d539510..a6670e9e3 100644 --- a/iterator_test.go +++ b/iterator_test.go @@ -28,9 +28,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) type tableMock struct { diff --git a/key_registry.go b/key_registry.go index 306e9c129..a1be0435d 100644 --- a/key_registry.go +++ b/key_registry.go @@ -28,8 +28,8 @@ import ( "sync" "time" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" ) const ( diff --git a/level_handler.go b/level_handler.go index 669c097f4..31673f15b 100644 --- a/level_handler.go +++ b/level_handler.go @@ -21,8 +21,8 @@ import ( "sort" "sync" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) type levelHandler struct { diff --git a/levels.go b/levels.go index f4f0f127f..387ee7e3e 100644 --- a/levels.go +++ b/levels.go @@ -33,9 +33,9 @@ import ( "github.com/pkg/errors" otrace "go.opencensus.io/trace" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/levels_test.go b/levels_test.go index 1e4448837..87ceaee4a 100644 --- a/levels_test.go +++ b/levels_test.go @@ -27,10 +27,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) // createAndOpen creates a table with the given data and adds it to the given level. diff --git a/managed_db_test.go b/managed_db_test.go index beca7d96f..abdbe9f30 100644 --- a/managed_db_test.go +++ b/managed_db_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/manifest.go b/manifest.go index b7f490856..274b98ce1 100644 --- a/manifest.go +++ b/manifest.go @@ -31,9 +31,9 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" ) // Manifest represents the contents of the MANIFEST file in a Badger store. diff --git a/manifest_test.go b/manifest_test.go index 0922f1b15..ec7e58086 100644 --- a/manifest_test.go +++ b/manifest_test.go @@ -30,10 +30,10 @@ import ( "github.com/stretchr/testify/require" otrace "go.opencensus.io/trace" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) func TestManifestBasic(t *testing.T) { diff --git a/memtable.go b/memtable.go index 12e4af29d..69bc7c23c 100644 --- a/memtable.go +++ b/memtable.go @@ -35,9 +35,9 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/skl" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/skl" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/merge.go b/merge.go index 4a08fc5a9..3ec28e90e 100644 --- a/merge.go +++ b/merge.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/options.go b/options.go index 89b005d07..f9dbdcf46 100644 --- a/options.go +++ b/options.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/options_test.go b/options_test.go index 54818dfaf..44865e913 100644 --- a/options_test.go +++ b/options_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - "github.com/dgraph-io/badger/v3/options" + "github.com/dgraph-io/badger/v4/options" ) func TestOptions(t *testing.T) { diff --git a/pb/badgerpb3.proto b/pb/badgerpb3.proto index d0df21fb3..855ec6d61 100644 --- a/pb/badgerpb3.proto +++ b/pb/badgerpb3.proto @@ -19,7 +19,7 @@ syntax = "proto3"; package badgerpb3; -option go_package = "github.com/dgraph-io/badger/v3/pb"; +option go_package = "github.com/dgraph-io/badger/v4/pb"; message KV { bytes key = 1; diff --git a/publisher.go b/publisher.go index b7ed6a65c..2d61c50de 100644 --- a/publisher.go +++ b/publisher.go @@ -20,9 +20,9 @@ import ( "sync" "sync/atomic" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/trie" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/trie" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/publisher_test.go b/publisher_test.go index 100c4d371..1113ba2e8 100644 --- a/publisher_test.go +++ b/publisher_test.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" ) // This test will result in deadlock for commits before this. diff --git a/skl/arena.go b/skl/arena.go index 98335f456..b471e8101 100644 --- a/skl/arena.go +++ b/skl/arena.go @@ -20,7 +20,7 @@ import ( "sync/atomic" "unsafe" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) const ( diff --git a/skl/skl.go b/skl/skl.go index 4dd67047a..3fe8cc4a8 100644 --- a/skl/skl.go +++ b/skl/skl.go @@ -37,7 +37,7 @@ import ( "sync/atomic" "unsafe" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/skl/skl_test.go b/skl/skl_test.go index 1cae86b14..6977bbc1f 100644 --- a/skl/skl_test.go +++ b/skl/skl_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) const arenaSize = 1 << 20 diff --git a/stream.go b/stream.go index 53b4fec35..21c5e9926 100644 --- a/stream.go +++ b/stream.go @@ -26,8 +26,8 @@ import ( humanize "github.com/dustin/go-humanize" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/stream_test.go b/stream_test.go index 9548ce279..9f9e5aa1c 100644 --- a/stream_test.go +++ b/stream_test.go @@ -28,9 +28,9 @@ import ( "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" - bpb "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + bpb "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/stream_writer.go b/stream_writer.go index f00eb6b68..6618b2f7c 100644 --- a/stream_writer.go +++ b/stream_writer.go @@ -24,9 +24,9 @@ import ( humanize "github.com/dustin/go-humanize" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/stream_writer_test.go b/stream_writer_test.go index 0e7f9229d..2535fd22f 100644 --- a/stream_writer_test.go +++ b/stream_writer_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/table/builder.go b/table/builder.go index f21b6753c..5c9e065e0 100644 --- a/table/builder.go +++ b/table/builder.go @@ -29,10 +29,10 @@ import ( fbs "github.com/google/flatbuffers/go" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/fb" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/fb" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/table/builder_test.go b/table/builder_test.go index 87843799d..157858c63 100644 --- a/table/builder_test.go +++ b/table/builder_test.go @@ -25,10 +25,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/fb" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/fb" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto" ) diff --git a/table/iterator.go b/table/iterator.go index 26c9043c2..109856582 100644 --- a/table/iterator.go +++ b/table/iterator.go @@ -22,8 +22,8 @@ import ( "io" "sort" - "github.com/dgraph-io/badger/v3/fb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/fb" + "github.com/dgraph-io/badger/v4/y" ) type blockIterator struct { diff --git a/table/merge_iterator.go b/table/merge_iterator.go index 70ccc0858..6e89fbbc2 100644 --- a/table/merge_iterator.go +++ b/table/merge_iterator.go @@ -19,7 +19,7 @@ package table import ( "bytes" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) // MergeIterator merges multiple iterators. diff --git a/table/merge_iterator_test.go b/table/merge_iterator_test.go index 9090f7624..b8d729795 100644 --- a/table/merge_iterator_test.go +++ b/table/merge_iterator_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) type SimpleIterator struct { diff --git a/table/table.go b/table/table.go index 91f7181e2..0bbc91089 100644 --- a/table/table.go +++ b/table/table.go @@ -35,10 +35,10 @@ import ( "github.com/golang/snappy" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/fb" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/fb" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto" "github.com/dgraph-io/ristretto/z" ) diff --git a/table/table_test.go b/table/table_test.go index c9f626024..98d3a3248 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -32,8 +32,8 @@ import ( "github.com/cespare/xxhash" "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/options" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/options" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto" ) diff --git a/test.sh b/test.sh index 15122767e..96b529237 100755 --- a/test.sh +++ b/test.sh @@ -16,7 +16,7 @@ fi # Run `go list` BEFORE setting GOFLAGS so that the output is in the right # format for grep. # export packages because the test will run in a sub process. -export packages=$(go list ./... | grep "github.com/dgraph-io/badger/v3/") +export packages=$(go list ./... | grep "github.com/dgraph-io/badger/v4/") tags="-tags=jemalloc" @@ -66,7 +66,7 @@ manual() { root() { # Run the normal tests. - # go test -timeout=25m -v -race github.com/dgraph-io/badger/v3/... + # go test -timeout=25m -v -race github.com/dgraph-io/badger/v4/... echo "==> Running root level tests." set -e diff --git a/trie/trie.go b/trie/trie.go index ec2434d4b..2c250c3b8 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/pb" + "github.com/dgraph-io/badger/v4/y" ) type node struct { diff --git a/trie/trie_test.go b/trie/trie_test.go index 1f55ecb6d..12cb95eca 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" ) func TestGet(t *testing.T) { diff --git a/txn.go b/txn.go index 4f575df14..4a5fe476c 100644 --- a/txn.go +++ b/txn.go @@ -28,7 +28,7 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/txn_test.go b/txn_test.go index 2f435bbed..3830855fe 100644 --- a/txn_test.go +++ b/txn_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/util.go b/util.go index 9891ca979..8192594c2 100644 --- a/util.go +++ b/util.go @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/table" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/table" + "github.com/dgraph-io/badger/v4/y" ) func (s *levelsController) validate() error { diff --git a/value.go b/value.go index e63a93388..a1655ab32 100644 --- a/value.go +++ b/value.go @@ -34,7 +34,7 @@ import ( "github.com/pkg/errors" otrace "go.opencensus.io/trace" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/z" ) diff --git a/value_test.go b/value_test.go index 093d91eb7..d4e05fe1f 100644 --- a/value_test.go +++ b/value_test.go @@ -31,7 +31,7 @@ import ( humanize "github.com/dustin/go-humanize" "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/y" + "github.com/dgraph-io/badger/v4/y" ) func TestDynamicValueThreshold(t *testing.T) { diff --git a/y/checksum.go b/y/checksum.go index e9aee1755..9fbcc26ae 100644 --- a/y/checksum.go +++ b/y/checksum.go @@ -22,7 +22,7 @@ import ( "github.com/cespare/xxhash" "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" ) // ErrChecksumMismatch is returned at checksum mismatch. diff --git a/y/y.go b/y/y.go index c5ff26443..7821ee8a6 100644 --- a/y/y.go +++ b/y/y.go @@ -32,7 +32,7 @@ import ( "github.com/pkg/errors" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/ristretto/z" ) diff --git a/y/y_test.go b/y/y_test.go index ce4cab2b2..f3b80c1d4 100644 --- a/y/y_test.go +++ b/y/y_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/dgraph-io/badger/v3/pb" + "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/ristretto/z" )