Skip to content

Commit

Permalink
retract v4.3.0 due to #2121 and #2113, upgrade to Go v1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 committed Oct 24, 2024
1 parent ca7c9d4 commit ccb8f71
Show file tree
Hide file tree
Showing 39 changed files with 50 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19
1.23
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For more details on our version naming schema please read [Choosing a version](#
## Getting Started

### Installing
To start using Badger, install Go 1.19 or above. Badger v3 and above needs go modules. From your project, run the following command
To start using Badger, install Go 1.23 or above. Badger v3 and above needs go modules. From your project, run the following command

```sh
$ go get github.com/dgraph-io/badger/v4
Expand Down
49 changes: 0 additions & 49 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

// flushThreshold determines when a buffer will be flushed. When performing a
Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

var testCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/read_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

var readBenchCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/write_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

var writeBenchCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"go.opencensus.io/zpages"

"github.com/dgraph-io/badger/v4/badger/cmd"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

// WriteBatch holds the necessary info to perform batched writes.
Expand Down
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2"
"github.com/dgraph-io/ristretto/v2/z"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion db2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

func TestTruncateVlogWithClose(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

// waitForMessage(ch, expected, count, timeout, t) will block until either
Expand Down
2 changes: 1 addition & 1 deletion discard.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

// discardStats keeps track of the amount of data that could be discarded for
Expand Down
8 changes: 4 additions & 4 deletions docs/content/get-started/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
+++
title = "Get Started - Quickstart Guide"
aliases = ["/get-started"]
+++
title = "Get Started - Quickstart Guide"
aliases = ["/get-started"]
+++


## Installing
To start using Badger, install Go 1.19 or above. Run the following command to retrieve the library.
To start using Badger, install Go 1.23 or above. Run the following command to retrieve the library.

```sh
$ go get github.com/dgraph-io/badger/v4
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/dgraph-io/badger/v4

go 1.19
go 1.23

require (
github.com/cespare/xxhash/v2 v2.3.0
github.com/dgraph-io/ristretto v1.0.0
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha
github.com/dustin/go-humanize v1.0.1
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
Expand All @@ -31,3 +31,5 @@ require (
)

retract v4.0.0 // see #1888 and #1889

retract v4.3.0 // see #2113 and #2121
7 changes: 5 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgraph-io/ristretto v1.0.0 h1:SYG07bONKMlFDUYu5pEu3DGAh8c2OFNzKm6G9J4Si84=
github.com/dgraph-io/ristretto v1.0.0/go.mod h1:jTi2FiYEhQ1NsMmA7DeBykizjOuY88NhKBkepyu1jPc=
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha h1:JBy5Mm/z1HBj3hyDLFBS2uHalL971q3yjUaKcia0Sgo=
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha/go.mod h1:7bFGBdXzLfFFjKCN8YDQ7+98m/AEYcrdqH7s0En96Qg=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down Expand Up @@ -44,6 +45,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
Expand Down Expand Up @@ -108,6 +110,7 @@ golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
Expand Down
2 changes: 1 addition & 1 deletion integration/testgc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

var maxValue int64 = 10000000
Expand Down
2 changes: 1 addition & 1 deletion iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/dgraph-io/badger/v4/table"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

type prefetchStatus uint8
Expand Down
2 changes: 1 addition & 1 deletion levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

type levelsController struct {
Expand Down
2 changes: 1 addition & 1 deletion managed_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

func val(large bool) []byte {
Expand Down
2 changes: 1 addition & 1 deletion memtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

// memTable structure stores a skiplist and a corresponding WAL. Writes to memTable are written
Expand Down
2 changes: 1 addition & 1 deletion merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

// MergeOperator represents a Badger merge operator.
Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

// Note: If you add a new option X make sure you also add a WithX method on Options.
Expand Down
2 changes: 1 addition & 1 deletion publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

type subscriber struct {
Expand Down
2 changes: 1 addition & 1 deletion skl/skl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"unsafe"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

const batchSize = 16 << 20 // 16 MB
Expand Down
2 changes: 1 addition & 1 deletion stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

bpb "github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

func keyWithPrefix(prefix string, k int) []byte {
Expand Down
2 changes: 1 addition & 1 deletion stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

// StreamWriter is used to write data coming from multiple streams. The streams must not have any
Expand Down
2 changes: 1 addition & 1 deletion stream_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

func getSortedKVList(valueSize, listSize int) *z.Buffer {
Expand Down
2 changes: 1 addition & 1 deletion table/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2/z"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion table/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"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/v2"
)

func TestTableIndex(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
"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"
"github.com/dgraph-io/ristretto/v2"
"github.com/dgraph-io/ristretto/v2/z"
)

const fileSuffix = ".sst"
Expand Down
2 changes: 1 addition & 1 deletion table/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

"github.com/dgraph-io/badger/v4/options"
"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto"
"github.com/dgraph-io/ristretto/v2"
)

func key(prefix string, i int) string {
Expand Down
2 changes: 1 addition & 1 deletion txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/pkg/errors"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

type oracle struct {
Expand Down
2 changes: 1 addition & 1 deletion txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/dgraph-io/badger/v4/y"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/ristretto/v2/z"
)

func TestTxnSimple(t *testing.T) {
Expand Down
Loading

0 comments on commit ccb8f71

Please sign in to comment.