Skip to content

Commit

Permalink
store/driver: update unionstore import path (pingcap#25823)
Browse files Browse the repository at this point in the history
  • Loading branch information
disksing authored Jun 30, 2021
1 parent 3ad894d commit e8af6eb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions store/driver/txn/unionstore_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import (
"github.com/pingcap/tidb/kv"
derr "github.com/pingcap/tidb/store/driver/error"
tikvstore "github.com/tikv/client-go/v2/kv"
"github.com/tikv/client-go/v2/unionstore"
"github.com/tikv/client-go/v2/tikv"
)

// memBuffer wraps unionstore.MemDB as kv.MemBuffer.
// memBuffer wraps tikv.MemDB as kv.MemBuffer.
type memBuffer struct {
*unionstore.MemDB
*tikv.MemDB
}

func newMemBuffer(m *unionstore.MemDB) kv.MemBuffer {
func newMemBuffer(m *tikv.MemDB) kv.MemBuffer {
if m == nil {
return nil
}
Expand Down Expand Up @@ -112,10 +112,10 @@ func (m *memBuffer) SnapshotGetter() kv.Getter {
}

type tikvGetter struct {
unionstore.Getter
tikv.Getter
}

func newKVGetter(getter unionstore.Getter) kv.Getter {
func newKVGetter(getter tikv.Getter) kv.Getter {
return &tikvGetter{Getter: getter}
}

Expand All @@ -124,12 +124,12 @@ func (g *tikvGetter) Get(_ context.Context, k kv.Key) ([]byte, error) {
return data, derr.ToTiDBErr(err)
}

// tikvIterator wraps unionstore.Iterator as kv.Iterator
// tikvIterator wraps tikv.Iterator as kv.Iterator
type tikvIterator struct {
unionstore.Iterator
tikv.Iterator
}

func newKVIterator(it unionstore.Iterator) kv.Iterator {
func newKVIterator(it tikv.Iterator) kv.Iterator {
if it == nil {
return nil
}
Expand Down

0 comments on commit e8af6eb

Please sign in to comment.