Skip to content

Commit 9781837

Browse files
committed
retract v4.3.0 due to #2121 and #2113, upgrade to Go v1.23
1 parent 10a09e6 commit 9781837

39 files changed

+50
-94
lines changed

.go-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.19
1+
1.23

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For more details on our version naming schema please read [Choosing a version](#
6262
## Getting Started
6363

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

6767
```sh
6868
$ go get github.com/dgraph-io/badger/v4

appveyor.yml

-49
This file was deleted.

backup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
"github.com/dgraph-io/badger/v4/pb"
3030
"github.com/dgraph-io/badger/v4/y"
31-
"github.com/dgraph-io/ristretto/z"
31+
"github.com/dgraph-io/ristretto/v2/z"
3232
)
3333

3434
// flushThreshold determines when a buffer will be flushed. When performing a

badger/cmd/bank.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/dgraph-io/badger/v4"
3737
"github.com/dgraph-io/badger/v4/pb"
3838
"github.com/dgraph-io/badger/v4/y"
39-
"github.com/dgraph-io/ristretto/z"
39+
"github.com/dgraph-io/ristretto/v2/z"
4040
)
4141

4242
var testCmd = &cobra.Command{

badger/cmd/read_bench.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/dgraph-io/badger/v4"
3232
"github.com/dgraph-io/badger/v4/pb"
3333
"github.com/dgraph-io/badger/v4/y"
34-
"github.com/dgraph-io/ristretto/z"
34+
"github.com/dgraph-io/ristretto/v2/z"
3535
)
3636

3737
var readBenchCmd = &cobra.Command{

badger/cmd/write_bench.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/dgraph-io/badger/v4/options"
3737
"github.com/dgraph-io/badger/v4/pb"
3838
"github.com/dgraph-io/badger/v4/y"
39-
"github.com/dgraph-io/ristretto/z"
39+
"github.com/dgraph-io/ristretto/v2/z"
4040
)
4141

4242
var writeBenchCmd = &cobra.Command{

badger/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"go.opencensus.io/zpages"
2727

2828
"github.com/dgraph-io/badger/v4/badger/cmd"
29-
"github.com/dgraph-io/ristretto/z"
29+
"github.com/dgraph-io/ristretto/v2/z"
3030
)
3131

3232
func main() {

batch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"github.com/dgraph-io/badger/v4/pb"
2626
"github.com/dgraph-io/badger/v4/y"
27-
"github.com/dgraph-io/ristretto/z"
27+
"github.com/dgraph-io/ristretto/v2/z"
2828
)
2929

3030
// WriteBatch holds the necessary info to perform batched writes.

db.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import (
4141
"github.com/dgraph-io/badger/v4/skl"
4242
"github.com/dgraph-io/badger/v4/table"
4343
"github.com/dgraph-io/badger/v4/y"
44-
"github.com/dgraph-io/ristretto"
45-
"github.com/dgraph-io/ristretto/z"
44+
"github.com/dgraph-io/ristretto/v2"
45+
"github.com/dgraph-io/ristretto/v2/z"
4646
)
4747

4848
var (

db2_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"github.com/dgraph-io/badger/v4/pb"
4040
"github.com/dgraph-io/badger/v4/table"
4141
"github.com/dgraph-io/badger/v4/y"
42-
"github.com/dgraph-io/ristretto/z"
42+
"github.com/dgraph-io/ristretto/v2/z"
4343
)
4444

4545
func TestTruncateVlogWithClose(t *testing.T) {

db_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/dgraph-io/badger/v4/options"
3838
"github.com/dgraph-io/badger/v4/pb"
3939
"github.com/dgraph-io/badger/v4/y"
40-
"github.com/dgraph-io/ristretto/z"
40+
"github.com/dgraph-io/ristretto/v2/z"
4141
)
4242

4343
// waitForMessage(ch, expected, count, timeout, t) will block until either

discard.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"sync"
2525

2626
"github.com/dgraph-io/badger/v4/y"
27-
"github.com/dgraph-io/ristretto/z"
27+
"github.com/dgraph-io/ristretto/v2/z"
2828
)
2929

3030
// discardStats keeps track of the amount of data that could be discarded for

docs/content/get-started/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
+++
2-
title = "Get Started - Quickstart Guide"
3-
aliases = ["/get-started"]
1+
+++
2+
title = "Get Started - Quickstart Guide"
3+
aliases = ["/get-started"]
44
+++
55

66

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

1010
```sh
1111
$ go get github.com/dgraph-io/badger/v4

go.mod

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/dgraph-io/badger/v4
22

3-
go 1.19
3+
go 1.23
44

55
require (
66
github.com/cespare/xxhash/v2 v2.3.0
7-
github.com/dgraph-io/ristretto v1.0.0
7+
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha
88
github.com/dustin/go-humanize v1.0.1
99
github.com/gogo/protobuf v1.3.2
1010
github.com/golang/protobuf v1.5.4
@@ -31,3 +31,5 @@ require (
3131
)
3232

3333
retract v4.0.0 // see #1888 and #1889
34+
35+
retract v4.3.0 // see #2113 and #2121

go.sum

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
99
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1010
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1111
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
12-
github.com/dgraph-io/ristretto v1.0.0 h1:SYG07bONKMlFDUYu5pEu3DGAh8c2OFNzKm6G9J4Si84=
13-
github.com/dgraph-io/ristretto v1.0.0/go.mod h1:jTi2FiYEhQ1NsMmA7DeBykizjOuY88NhKBkepyu1jPc=
12+
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha h1:JBy5Mm/z1HBj3hyDLFBS2uHalL971q3yjUaKcia0Sgo=
13+
github.com/dgraph-io/ristretto/v2 v2.0.0-alpha/go.mod h1:7bFGBdXzLfFFjKCN8YDQ7+98m/AEYcrdqH7s0En96Qg=
1414
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
15+
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
1516
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
1617
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
1718
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -44,6 +45,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
4445
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
4546
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
4647
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
48+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
4749
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
4850
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
4951
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
@@ -108,6 +110,7 @@ golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
108110
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
109111
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
110112
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
113+
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
111114
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
112115
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
113116
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=

integration/testgc/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/dgraph-io/badger/v4"
1616
"github.com/dgraph-io/badger/v4/y"
17-
"github.com/dgraph-io/ristretto/z"
17+
"github.com/dgraph-io/ristretto/v2/z"
1818
)
1919

2020
var maxValue int64 = 10000000

iterator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
"github.com/dgraph-io/badger/v4/table"
2929
"github.com/dgraph-io/badger/v4/y"
30-
"github.com/dgraph-io/ristretto/z"
30+
"github.com/dgraph-io/ristretto/v2/z"
3131
)
3232

3333
type prefetchStatus uint8

levels.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/dgraph-io/badger/v4/pb"
3838
"github.com/dgraph-io/badger/v4/table"
3939
"github.com/dgraph-io/badger/v4/y"
40-
"github.com/dgraph-io/ristretto/z"
40+
"github.com/dgraph-io/ristretto/v2/z"
4141
)
4242

4343
type levelsController struct {

managed_db_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/stretchr/testify/require"
1515

1616
"github.com/dgraph-io/badger/v4/y"
17-
"github.com/dgraph-io/ristretto/z"
17+
"github.com/dgraph-io/ristretto/v2/z"
1818
)
1919

2020
func val(large bool) []byte {

memtable.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"github.com/dgraph-io/badger/v4/pb"
3939
"github.com/dgraph-io/badger/v4/skl"
4040
"github.com/dgraph-io/badger/v4/y"
41-
"github.com/dgraph-io/ristretto/z"
41+
"github.com/dgraph-io/ristretto/v2/z"
4242
)
4343

4444
// memTable structure stores a skiplist and a corresponding WAL. Writes to memTable are written

merge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"time"
2323

2424
"github.com/dgraph-io/badger/v4/y"
25-
"github.com/dgraph-io/ristretto/z"
25+
"github.com/dgraph-io/ristretto/v2/z"
2626
)
2727

2828
// MergeOperator represents a Badger merge operator.

options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/dgraph-io/badger/v4/options"
3030
"github.com/dgraph-io/badger/v4/table"
3131
"github.com/dgraph-io/badger/v4/y"
32-
"github.com/dgraph-io/ristretto/z"
32+
"github.com/dgraph-io/ristretto/v2/z"
3333
)
3434

3535
// Note: If you add a new option X make sure you also add a WithX method on Options.

publisher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/dgraph-io/badger/v4/pb"
2424
"github.com/dgraph-io/badger/v4/trie"
2525
"github.com/dgraph-io/badger/v4/y"
26-
"github.com/dgraph-io/ristretto/z"
26+
"github.com/dgraph-io/ristretto/v2/z"
2727
)
2828

2929
type subscriber struct {

skl/skl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"unsafe"
3939

4040
"github.com/dgraph-io/badger/v4/y"
41-
"github.com/dgraph-io/ristretto/z"
41+
"github.com/dgraph-io/ristretto/v2/z"
4242
)
4343

4444
const (

stream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
"github.com/dgraph-io/badger/v4/pb"
3030
"github.com/dgraph-io/badger/v4/y"
31-
"github.com/dgraph-io/ristretto/z"
31+
"github.com/dgraph-io/ristretto/v2/z"
3232
)
3333

3434
const batchSize = 16 << 20 // 16 MB

stream_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
bpb "github.com/dgraph-io/badger/v4/pb"
3232
"github.com/dgraph-io/badger/v4/y"
33-
"github.com/dgraph-io/ristretto/z"
33+
"github.com/dgraph-io/ristretto/v2/z"
3434
)
3535

3636
func keyWithPrefix(prefix string, k int) []byte {

stream_writer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/dgraph-io/badger/v4/pb"
2828
"github.com/dgraph-io/badger/v4/table"
2929
"github.com/dgraph-io/badger/v4/y"
30-
"github.com/dgraph-io/ristretto/z"
30+
"github.com/dgraph-io/ristretto/v2/z"
3131
)
3232

3333
// StreamWriter is used to write data coming from multiple streams. The streams must not have any

stream_writer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929

3030
"github.com/dgraph-io/badger/v4/pb"
3131
"github.com/dgraph-io/badger/v4/y"
32-
"github.com/dgraph-io/ristretto/z"
32+
"github.com/dgraph-io/ristretto/v2/z"
3333
)
3434

3535
func getSortedKVList(valueSize, listSize int) *z.Buffer {

table/builder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"github.com/dgraph-io/badger/v4/options"
3434
"github.com/dgraph-io/badger/v4/pb"
3535
"github.com/dgraph-io/badger/v4/y"
36-
"github.com/dgraph-io/ristretto/z"
36+
"github.com/dgraph-io/ristretto/v2/z"
3737
)
3838

3939
const (

table/builder_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/dgraph-io/badger/v4/options"
3030
"github.com/dgraph-io/badger/v4/pb"
3131
"github.com/dgraph-io/badger/v4/y"
32-
"github.com/dgraph-io/ristretto"
32+
"github.com/dgraph-io/ristretto/v2"
3333
)
3434

3535
func TestTableIndex(t *testing.T) {

table/table.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ import (
4040
"github.com/dgraph-io/badger/v4/options"
4141
"github.com/dgraph-io/badger/v4/pb"
4242
"github.com/dgraph-io/badger/v4/y"
43-
"github.com/dgraph-io/ristretto"
44-
"github.com/dgraph-io/ristretto/z"
43+
"github.com/dgraph-io/ristretto/v2"
44+
"github.com/dgraph-io/ristretto/v2/z"
4545
)
4646

4747
const fileSuffix = ".sst"

table/table_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
"github.com/dgraph-io/badger/v4/options"
3636
"github.com/dgraph-io/badger/v4/y"
37-
"github.com/dgraph-io/ristretto"
37+
"github.com/dgraph-io/ristretto/v2"
3838
)
3939

4040
func key(prefix string, i int) string {

txn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/pkg/errors"
3030

3131
"github.com/dgraph-io/badger/v4/y"
32-
"github.com/dgraph-io/ristretto/z"
32+
"github.com/dgraph-io/ristretto/v2/z"
3333
)
3434

3535
type oracle struct {

txn_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/stretchr/testify/require"
3030

3131
"github.com/dgraph-io/badger/v4/y"
32-
"github.com/dgraph-io/ristretto/z"
32+
"github.com/dgraph-io/ristretto/v2/z"
3333
)
3434

3535
func TestTxnSimple(t *testing.T) {

0 commit comments

Comments
 (0)