Skip to content

Commit

Permalink
Merge pull request #882 from dgraph-io/v2mod
Browse files Browse the repository at this point in the history
release badger v2.0.0
  • Loading branch information
Francesc Campoy authored Jun 20, 2019
2 parents 6a824d0 + ad0b5cb commit 41d170b
Show file tree
Hide file tree
Showing 47 changed files with 96 additions and 96 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: go

go:
- "1.10"
- "1.11"
- "1.12"

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ few months. The [Changelog] is kept fairly up-to-date.
## Getting Started

### Installing
To start using Badger, install Go 1.8 or above and run `go get`:
To start using Badger, install Go 1.11 or above and run `go get`:

```sh
$ go get github.com/dgraph-io/badger/...
$ go get github.com/dgraph-io/badger/v2/...
```

This will retrieve the library and install the `badger` command line
Expand All @@ -76,7 +76,7 @@ package main
import (
"log"

"github.com/dgraph-io/badger"
badger "github.com/dgraph-io/badger/v2"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clone_folder: c:\gopath\src\github.com\dgraph-io\badger
environment:
GOVERSION: 1.8.3
GOPATH: c:\gopath
GO111MODULE: on

# scripts that run after cloning repository
install:
Expand All @@ -33,8 +34,8 @@ build_script:
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test -v github.com/dgraph-io/badger/...
- go test -v -vlog_mmap=false github.com/dgraph-io/badger/...
- go test -v github.com/dgraph-io/badger/v2/...
- go test -v -vlog_mmap=false github.com/dgraph-io/badger/v2/...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed

notifications:
Expand Down
4 changes: 2 additions & 2 deletions backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"encoding/binary"
"io"

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

// Backup is a wrapper function over Stream.Backup to generate full and incremental backups of the
Expand Down
2 changes: 1 addition & 1 deletion backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/v2/pb"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions badger/cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"bufio"
"os"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/y"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"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/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package cmd

import (
"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/v2"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (

"github.com/pkg/errors"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"
)
Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/read_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"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"
)

var readBenchCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"path"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/v2"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions badger/cmd/write_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"

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

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 @@ -22,7 +22,7 @@ import (
_ "net/http/pprof"
"runtime"

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

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

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

// WriteBatch holds the necessary info to perform batched writes.
Expand Down
4 changes: 2 additions & 2 deletions compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"golang.org/x/net/trace"

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

type keyRange struct {
Expand Down
10 changes: 5 additions & 5 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/skl"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"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"
humanize "github.com/dustin/go-humanize"
"github.com/pkg/errors"
"golang.org/x/net/trace"
Expand Down
8 changes: 4 additions & 4 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/skl"
"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/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dgraph-io/badger
module github.com/dgraph-io/badger/v2

require (
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7
Expand Down
6 changes: 3 additions & 3 deletions integration/testgc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync/atomic"
"time"

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

var maxValue int64 = 10000000
Expand Down
6 changes: 3 additions & 3 deletions iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"

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

type prefetchStatus uint8
Expand Down
6 changes: 3 additions & 3 deletions iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"strings"
"testing"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -162,7 +162,7 @@ func TestIteratePrefix(t *testing.T) {
// Benchmark with NO opt.Prefix set ===
// goos: linux
// goarch: amd64
// pkg: github.com/dgraph-io/badger
// pkg: github.com/dgraph-io/badger/v2
// BenchmarkIteratePrefixSingleKey/Key_lookups-4 10000 460924 ns/op
// --- BENCH: BenchmarkIteratePrefixSingleKey/Key_lookups-4
// iterator_test.go:147: Inner b.N: 1
Expand Down
4 changes: 2 additions & 2 deletions level_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"sort"
"sync"

"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"golang.org/x/net/trace"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion managed_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"path/filepath"
"sync"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
8 changes: 4 additions & 4 deletions manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (

"golang.org/x/net/trace"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"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/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sync"
"time"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package badger

import (
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/v2/options"
)

// NOTE: Keep the comments in the following to 75 chars width, so they
Expand Down
4 changes: 2 additions & 2 deletions publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"bytes"
"sync"

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

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

"github.com/stretchr/testify/require"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/v2/pb"
)

func TestPublisherOrdering(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion skl/arena.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sync/atomic"
"unsafe"

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

const (
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 (
"sync/atomic"
"unsafe"

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

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

"github.com/stretchr/testify/require"

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

const arenaSize = 1 << 20
Expand Down
Loading

0 comments on commit 41d170b

Please sign in to comment.