Skip to content

Commit

Permalink
update badger version to a stable branch and change path to pingcap (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
coocood authored Jun 4, 2020
1 parent 05e6598 commit 5004cda
Show file tree
Hide file tree
Showing 39 changed files with 63 additions and 61 deletions.
4 changes: 2 additions & 2 deletions cmd/unistore-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"time"

"github.com/BurntSushi/toml"
"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/config"
"github.com/ngaut/unistore/pd"
"github.com/ngaut/unistore/server"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/kvproto/pkg/deadlock"
"github.com/pingcap/kvproto/pkg/tikvpb"
"github.com/pingcap/log"
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package config
import (
"time"

"github.com/coocood/badger/options"
"github.com/pingcap/badger/options"
"github.com/pingcap/log"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module github.com/ngaut/unistore

require (
github.com/BurntSushi/toml v0.3.1
github.com/coocood/badger v1.5.1-0.20200528065104-c02ac3616d04
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.3.4
github.com/google/btree v1.0.0
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5
github.com/pierrec/lz4 v2.0.5+incompatible
github.com/pingcap/badger v1.5.1-0.20200604041313-19c397305fcc
github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712
github.com/pingcap/errors v0.11.5-0.20190809092503-95897b64e011
github.com/pingcap/kvproto v0.0.0-20200518112156-d4aeb467de29
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20200407064406-b2b8ad403d01/go.mod h1:77fCh8d3oKzC5ceOJWeZXAS/mLzVgdZ7rKniwmOyFuo=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20200514075710-eecc9a4525b5/go.mod h1:8q+yDx0STBPri8xS4A2duS1dAf+xO0cMtjwe0t6MWJk=
github.com/pingcap/badger v1.5.1-0.20200604041313-19c397305fcc h1:aL83XYtYRGJHGruiw5Kk/vJiJl2xFiWfqCgnvHin7ek=
github.com/pingcap/badger v1.5.1-0.20200604041313-19c397305fcc/go.mod h1:LyrqUOHZrUDf9oGi1yoz1+qw9ckSIhQb5eMa1acOLNQ=
github.com/pingcap/br v0.0.0-20200426093517-dd11ae28b885 h1:gI14HoGBF9UyECMgqSRZx1ONhREtrZe8JCmZ/6OFilw=
github.com/pingcap/br v0.0.0-20200426093517-dd11ae28b885/go.mod h1:4w3meMnk7HDNpNgjuRAxavruTeKJvUiXxoEWTjzXPnA=
github.com/pingcap/br v0.0.0-20200521085655-53201addd4ad h1:nptiQT0kWdIUghh49OyaTBYb4DtdxJmsLHOxbU25kW4=
Expand Down
4 changes: 2 additions & 2 deletions rocksdb/block_based_table_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"math"
"os"

"github.com/coocood/badger/fileutil"
"github.com/coocood/badger/y"
"github.com/pingcap/badger/fileutil"
"github.com/pingcap/badger/y"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion rocksdb/block_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

package rocksdb

import "github.com/coocood/badger/y"
import "github.com/pingcap/badger/y"

// 1-byte type + 32-bit crc
const blockTrailerSize = 5
Expand Down
2 changes: 1 addition & 1 deletion rocksdb/filter_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package rocksdb
import (
"bytes"

"github.com/coocood/badger/y"
"github.com/pingcap/badger/y"
)

type fullFilterBlockBuilder struct {
Expand Down
2 changes: 1 addition & 1 deletion rocksdb/sst_file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package rocksdb
import (
"os"

"github.com/coocood/badger/y"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"os"
"path/filepath"

"github.com/coocood/badger"
"github.com/coocood/badger/options"
"github.com/ngaut/unistore/config"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/pd"
"github.com/ngaut/unistore/tikv"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/ngaut/unistore/tikv/raftstore"
"github.com/pingcap/badger"
"github.com/pingcap/badger/options"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tikv/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"math"
"time"

"github.com/coocood/badger/y"
"github.com/golang/protobuf/proto"
"github.com/juju/errors"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/pingcap/badger/y"
"github.com/pingcap/kvproto/pkg/coprocessor"
"github.com/pingcap/parser/ast"
"github.com/pingcap/parser/charset"
Expand Down
4 changes: 2 additions & 2 deletions tikv/dbreader/db_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"bytes"
"math"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/juju/errors"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
)

Expand Down
4 changes: 2 additions & 2 deletions tikv/mock_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"sync/atomic"
"time"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/gogo/protobuf/proto"
"github.com/google/btree"
"github.com/juju/errors"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/kvproto/pkg/errorpb"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/kvproto/pkg/metapb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/mvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"time"
"unsafe"

"github.com/coocood/badger"
"github.com/dgryski/go-farm"
"github.com/juju/errors"
"github.com/ngaut/unistore/config"
Expand All @@ -35,6 +34,7 @@ import (
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/ngaut/unistore/util/lockwaiter"
"github.com/pingcap/badger"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/log"
"github.com/pingcap/tidb/sessionctx/stmtctx"
Expand Down
2 changes: 1 addition & 1 deletion tikv/mvcc/db_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package mvcc
import (
"sync"

"github.com/coocood/badger"
"github.com/ngaut/unistore/lockstore"
"github.com/pingcap/badger"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
)

Expand Down
2 changes: 1 addition & 1 deletion tikv/mvcc/tikv.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package mvcc

import (
"github.com/coocood/badger/y"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/tidb/util/codec"
Expand Down
4 changes: 2 additions & 2 deletions tikv/mvcc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (
"path/filepath"
"strings"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/config"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/ngaut/unistore/tikv/raftstore"
"github.com/ngaut/unistore/util/lockwaiter"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
. "github.com/pingcap/check"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/kvproto/pkg/metapb"
Expand Down
4 changes: 2 additions & 2 deletions tikv/raftstore/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"fmt"
"time"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/ngaut/unistore/tikv/raftstore/raftlog"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
Expand Down
4 changes: 2 additions & 2 deletions tikv/raftstore/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package raftstore
import (
"bytes"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/metapb"
rspb "github.com/pingcap/kvproto/pkg/raft_serverpb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/db_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ package raftstore
import (
"time"

"github.com/coocood/badger/y"
"github.com/ngaut/unistore/config"
"github.com/ngaut/unistore/metrics"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/ngaut/unistore/tikv/raftstore/raftlog"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/errorpb"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/db_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/ngaut/unistore/tikv/raftstore/raftlog"

"github.com/coocood/badger"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
rfpb "github.com/pingcap/kvproto/pkg/raft_cmdpb"
"github.com/stretchr/testify/assert"
Expand Down
4 changes: 2 additions & 2 deletions tikv/raftstore/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
"sync/atomic"
"time"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/cznic/mathutil"
"github.com/golang/protobuf/proto"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/metrics"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/raft_serverpb"
)
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/fsm_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/ngaut/unistore/tikv/raftstore/raftlog"

"github.com/coocood/badger/y"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/pingcap/kvproto/pkg/metapb"
Expand Down
4 changes: 2 additions & 2 deletions tikv/raftstore/fsm_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"github.com/ngaut/unistore/config"
"github.com/ngaut/unistore/tikv/raftstore/raftlog"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/pd"
"github.com/ngaut/unistore/rocksdb"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"bytes"
"encoding/binary"

"github.com/coocood/badger/y"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/tidb/util/codec"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"sync"
"time"

"github.com/coocood/badger"
"github.com/golang/protobuf/proto"
"github.com/ngaut/unistore/pd"
"github.com/pingcap/badger"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
Expand Down
4 changes: 2 additions & 2 deletions tikv/raftstore/peer_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"sync/atomic"
"time"

"github.com/coocood/badger"
"github.com/coocood/badger/y"
"github.com/cznic/mathutil"
"github.com/golang/protobuf/proto"
"github.com/ngaut/unistore/tikv/dbreader"
"github.com/pingcap/badger"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/pingcap/kvproto/pkg/metapb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/peer_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"math"
"testing"

"github.com/coocood/badger"
"github.com/pingcap/badger"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package raftstore
import (
"encoding/binary"

"github.com/coocood/badger"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/pingcap/kvproto/pkg/raft_cmdpb"
"github.com/pingcap/log"
Expand Down
8 changes: 4 additions & 4 deletions tikv/raftstore/snap.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"sync/atomic"
"time"

"github.com/coocood/badger/table/sstable"
"github.com/coocood/badger/y"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger/table"
"github.com/pingcap/badger/y"

"github.com/ngaut/unistore/rocksdb"
"github.com/ngaut/unistore/util"
Expand Down Expand Up @@ -108,11 +108,11 @@ type ApplyOptions struct {
DBBundle *mvcc.DBBundle
Region *metapb.Region
Abort *uint32
Builder *sstable.Builder
Builder *table.Builder
WB *WriteBatch
}

func newApplyOptions(db *mvcc.DBBundle, region *metapb.Region, abort *uint32, builder *sstable.Builder, wb *WriteBatch) *ApplyOptions {
func newApplyOptions(db *mvcc.DBBundle, region *metapb.Region, abort *uint32, builder *table.Builder, wb *WriteBatch) *ApplyOptions {
return &ApplyOptions{
DBBundle: db,
Region: region,
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/snap_applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"io/ioutil"
"os"

"github.com/coocood/badger/y"
"github.com/ngaut/unistore/rocksdb"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/tidb/util/codec"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/snap_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"math"
"os"

"github.com/coocood/badger"
"github.com/ngaut/unistore/lockstore"
"github.com/ngaut/unistore/rocksdb"
"github.com/ngaut/unistore/tikv/mvcc"
"github.com/pingcap/badger"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
"github.com/pingcap/kvproto/pkg/metapb"
Expand Down
2 changes: 1 addition & 1 deletion tikv/raftstore/snap_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package raftstore

import (
"github.com/coocood/badger/y"
"github.com/pingcap/badger/y"
"github.com/pingcap/errors"
"github.com/pingcap/tidb/util/codec"
)
Expand Down
Loading

0 comments on commit 5004cda

Please sign in to comment.