changing badger module path to v3 (#1636)

* changing badger module path to v3

* running go mod tidy

* updating metric keys + proto package
This commit is contained in:
aman bansal
2021-01-13 10:55:37 +05:30
committed by GitHub
parent 8e5876c498
commit e1df1ab762
68 changed files with 331 additions and 331 deletions
+2 -2
View File
@@ -54,11 +54,11 @@ For more details on our version naming schema please read [Choosing a version](#
To start using Badger, install Go 1.12 or above. Badger v2 needs go modules. Run the following command to retrieve the library.
```sh
$ go get github.com/dgraph-io/badger/v2
$ go get github.com/dgraph-io/badger/v3
```
This will retrieve the library.
##### Note: Badger does not directly use CGO but it relies on https://github.com/DataDog/zstd for compression and it requires gcc/cgo. If you wish to use badger without gcc/cgo, you can run `CGO_ENABLED=0 go get github.com/dgraph-io/badger/v2` which will download badger without the support for ZSTD compression algorithm.
##### Note: Badger does not directly use CGO but it relies on https://github.com/DataDog/zstd for compression and it requires gcc/cgo. If you wish to use badger without gcc/cgo, you can run `CGO_ENABLED=0 go get github.com/dgraph-io/badger/v3` which will download badger without the support for ZSTD compression algorithm.
#### Installing Badger Command Line Tool
+2 -2
View File
@@ -23,8 +23,8 @@ import (
"encoding/binary"
"io"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/golang/protobuf/proto"
)
+1 -1
View File
@@ -28,7 +28,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v3/pb"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"math"
"os"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v3"
"github.com/spf13/cobra"
)
+3 -3
View File
@@ -30,9 +30,9 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -20,8 +20,8 @@ import (
"fmt"
"math"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/options"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
+3 -3
View File
@@ -30,9 +30,9 @@ import (
"github.com/pkg/errors"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"
)
+3 -3
View File
@@ -28,9 +28,9 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
)
+1 -1
View File
@@ -22,7 +22,7 @@ import (
"os"
"path"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v3"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"os"
"time"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v3"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -22,8 +22,8 @@ import (
"os"
"testing"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/y"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -22,9 +22,9 @@ import (
"math"
"os"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v3/y"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
+4 -4
View File
@@ -32,10 +32,10 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
)
+1 -1
View File
@@ -22,7 +22,7 @@ import (
_ "net/http/pprof"
"runtime"
"github.com/dgraph-io/badger/v2/badger/cmd"
"github.com/dgraph-io/badger/v3/badger/cmd"
"github.com/dgraph-io/ristretto/z"
"github.com/dustin/go-humanize"
"go.opencensus.io/zpages"
+2 -2
View File
@@ -20,8 +20,8 @@ import (
"sync"
"sync/atomic"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/pkg/errors"
)
+1 -1
View File
@@ -22,7 +22,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -23,8 +23,8 @@ import (
"math"
"sync"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
)
type keyRange struct {
+5 -5
View File
@@ -31,11 +31,11 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/skl"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto"
"github.com/dgraph-io/ristretto/z"
humanize "github.com/dustin/go-humanize"
+4 -4
View File
@@ -34,11 +34,11 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -35,9 +35,9 @@ import (
"github.com/stretchr/testify/require"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
)
+1 -1
View File
@@ -22,7 +22,7 @@ import (
"path/filepath"
"strings"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
// directoryLockGuard holds a lock on a directory and a pid file inside. The pid file isn't part
+1 -1
View File
@@ -24,7 +24,7 @@ import (
"os"
"path/filepath"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"golang.org/x/sys/unix"
)
+1 -1
View File
@@ -24,7 +24,7 @@ import (
"path/filepath"
"syscall"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
// FILE_ATTRIBUTE_TEMPORARY - A file that is being used for temporary storage.
+1 -1
View File
@@ -23,7 +23,7 @@ import (
"sort"
"sync"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
)
+2 -2
View File
@@ -8,7 +8,7 @@ aliases = ["/get-started"]
To start using Badger, install Go 1.12 or above. Badger v2 needs go modules. Run the following command to retrieve the library.
```sh
$ go get github.com/dgraph-io/badger/v2
$ go get github.com/dgraph-io/badger/v3
```
This will retrieve the library.
@@ -60,7 +60,7 @@ package main
import (
"log"
badger "github.com/dgraph-io/badger/v2"
badger "github.com/dgraph-io/badger/v3"
)
func main() {
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/dgraph-io/badger/v2
module github.com/dgraph-io/badger/v3
go 1.12
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
)
+2 -2
View File
@@ -26,10 +26,10 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/ristretto/z"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
type prefetchStatus uint8
+3 -3
View File
@@ -26,9 +26,9 @@ import (
"strings"
"testing"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -28,8 +28,8 @@ import (
"sync"
"time"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
)
const (
+2 -2
View File
@@ -21,8 +21,8 @@ import (
"sort"
"sync"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
)
type levelHandler struct {
+3 -3
View File
@@ -32,9 +32,9 @@ import (
otrace "go.opencensus.io/trace"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
"github.com/pkg/errors"
)
+4 -4
View File
@@ -25,10 +25,10 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/stretchr/testify/require"
)
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -27,9 +27,9 @@ import (
"path/filepath"
"sync"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
)
+4 -4
View File
@@ -28,10 +28,10 @@ import (
otrace "go.opencensus.io/trace"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/stretchr/testify/require"
)
+3 -3
View File
@@ -34,9 +34,9 @@ import (
"sync"
"sync/atomic"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/skl"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
"github.com/pkg/errors"
)
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"sync"
"time"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/pkg/errors"
)
+3 -3
View File
@@ -20,9 +20,9 @@ import (
"os"
"time"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
)
// Note: If you add a new option X make sure you also add a WithX method on Options.
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -17,9 +17,9 @@
// Use protos/gen.sh to generate .pb.go files.
syntax = "proto3";
package badgerpb2;
package badgerpb3;
option go_package = "github.com/dgraph-io/badger/v2/pb";
option go_package = "github.com/dgraph-io/badger/v3/pb";
message KV {
bytes key = 1;
+1 -1
View File
@@ -5,4 +5,4 @@
# You might need to go get -v github.com/gogo/protobuf/...
protoc --gofast_out=plugins=grpc:. --gofast_opt=paths=source_relative -I=. badgerpb2.proto
protoc --gofast_out=plugins=grpc:. --gofast_opt=paths=source_relative -I=. badgerpb3.proto
+3 -3
View File
@@ -19,9 +19,9 @@ package badger
import (
"sync"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/trie"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
)
+1 -1
View File
@@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v3/pb"
)
func TestPublisherOrdering(t *testing.T) {
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"sync/atomic"
"unsafe"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
const (
+1 -1
View File
@@ -37,7 +37,7 @@ import (
"sync/atomic"
"unsafe"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
)
+1 -1
View File
@@ -28,7 +28,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
const arenaSize = 1 << 20
+2 -2
View File
@@ -24,8 +24,8 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
humanize "github.com/dustin/go-humanize"
)
+3 -3
View File
@@ -25,9 +25,9 @@ import (
"strings"
"testing"
"github.com/dgraph-io/badger/v2/pb"
bpb "github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/require"
+3 -3
View File
@@ -21,9 +21,9 @@ import (
"fmt"
"sync"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
humanize "github.com/dustin/go-humanize"
"github.com/pkg/errors"
+2 -2
View File
@@ -28,8 +28,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
)
+4 -4
View File
@@ -24,15 +24,15 @@ import (
"sync/atomic"
"unsafe"
"github.com/dgraph-io/badger/v2/fb"
"github.com/dgraph-io/badger/v3/fb"
"github.com/golang/protobuf/proto"
"github.com/golang/snappy"
fbs "github.com/google/flatbuffers/go"
"github.com/pkg/errors"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto/z"
)
+4 -4
View File
@@ -25,10 +25,10 @@ import (
"github.com/stretchr/testify/require"
"github.com/dgraph-io/badger/v2/fb"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto"
)
+2 -2
View File
@@ -22,8 +22,8 @@ import (
"io"
"sort"
"github.com/dgraph-io/badger/v2/fb"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/fb"
"github.com/dgraph-io/badger/v3/y"
)
type blockIterator struct {
+1 -1
View File
@@ -19,7 +19,7 @@ package table
import (
"bytes"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
)
// MergeIterator merges multiple iterators.
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"sort"
"testing"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/stretchr/testify/require"
)
+4 -4
View File
@@ -36,10 +36,10 @@ import (
"github.com/golang/snappy"
"github.com/pkg/errors"
"github.com/dgraph-io/badger/v2/fb"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"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/ristretto"
"github.com/dgraph-io/ristretto/z"
)
+2 -2
View File
@@ -30,8 +30,8 @@ import (
"time"
"github.com/cespare/xxhash"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/options"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -7,7 +7,7 @@ go version
# 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/v2/")
export packages=$(go list ./... | grep "github.com/dgraph-io/badger/v3/")
if [[ ! -z "$TEAMCITY_VERSION" ]]; then
export GOFLAGS="-json"
@@ -87,7 +87,7 @@ manual() {
root() {
# Run the normal tests.
# go test -timeout=25m -v -race github.com/dgraph-io/badger/v2/...
# go test -timeout=25m -v -race github.com/dgraph-io/badger/v3/...
echo "==> Running root level tests."
set -e
+1 -1
View File
@@ -26,7 +26,7 @@ import (
"sync"
"sync/atomic"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/pkg/errors"
)
+1 -1
View File
@@ -26,7 +26,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/stretchr/testify/require"
+2 -2
View File
@@ -23,8 +23,8 @@ import (
"sync/atomic"
"time"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/table"
"github.com/dgraph-io/badger/v3/y"
"github.com/pkg/errors"
)
+1 -1
View File
@@ -32,7 +32,7 @@ import (
"sync"
"sync/atomic"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
"github.com/dgraph-io/ristretto/z"
"github.com/pkg/errors"
otrace "go.opencensus.io/trace"
+1 -1
View File
@@ -28,7 +28,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/y"
"github.com/dgraph-io/badger/v3/y"
humanize "github.com/dustin/go-humanize"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -19,7 +19,7 @@ package y
import (
"hash/crc32"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v3/pb"
"github.com/cespare/xxhash"
"github.com/pkg/errors"
+14 -14
View File
@@ -54,18 +54,18 @@ var (
// These variables are global and have cumulative values for all kv stores.
func init() {
NumReads = expvar.NewInt("badger_v2_disk_reads_total")
NumWrites = expvar.NewInt("badger_v2_disk_writes_total")
NumBytesRead = expvar.NewInt("badger_v2_read_bytes")
NumBytesWritten = expvar.NewInt("badger_v2_written_bytes")
NumLSMGets = expvar.NewMap("badger_v2_lsm_level_gets_total")
NumLSMBloomHits = expvar.NewMap("badger_v2_lsm_bloom_hits_total")
NumGets = expvar.NewInt("badger_v2_gets_total")
NumPuts = expvar.NewInt("badger_v2_puts_total")
NumBlockedPuts = expvar.NewInt("badger_v2_blocked_puts_total")
NumMemtableGets = expvar.NewInt("badger_v2_memtable_gets_total")
LSMSize = expvar.NewMap("badger_v2_lsm_size_bytes")
VlogSize = expvar.NewMap("badger_v2_vlog_size_bytes")
PendingWrites = expvar.NewMap("badger_v2_pending_writes_total")
NumCompactionTables = expvar.NewInt("badger_v2_compactions_current")
NumReads = expvar.NewInt("badger_v3_disk_reads_total")
NumWrites = expvar.NewInt("badger_v3_disk_writes_total")
NumBytesRead = expvar.NewInt("badger_v3_read_bytes")
NumBytesWritten = expvar.NewInt("badger_v3_written_bytes")
NumLSMGets = expvar.NewMap("badger_v3_lsm_level_gets_total")
NumLSMBloomHits = expvar.NewMap("badger_v3_lsm_bloom_hits_total")
NumGets = expvar.NewInt("badger_v3_gets_total")
NumPuts = expvar.NewInt("badger_v3_puts_total")
NumBlockedPuts = expvar.NewInt("badger_v3_blocked_puts_total")
NumMemtableGets = expvar.NewInt("badger_v3_memtable_gets_total")
LSMSize = expvar.NewMap("badger_v3_lsm_size_bytes")
VlogSize = expvar.NewMap("badger_v3_vlog_size_bytes")
PendingWrites = expvar.NewMap("badger_v3_pending_writes_total")
NumCompactionTables = expvar.NewInt("badger_v3_compactions_current")
}
+1 -1
View File
@@ -29,7 +29,7 @@ import (
"time"
"unsafe"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/ristretto/z"
"github.com/pkg/errors"
)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v3/pb"
"github.com/dgraph-io/ristretto/z"
"github.com/stretchr/testify/require"
)