Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
49286: *: rename pkg/kvserver/storage{base,pb} to pkg/kv/kvserver/kvserver{base,pb} r=irfansharif a=irfansharif

Not sure if there was a reason we didn't already do this.

``` 
    *: rename pkg/kvserver/storagebase to pkg/kv/kvserver/kvserverbase

    Simple goland rename and `make generate`. Fall out from earlier
    pkg/storage to pkg/kv{...} rename.

    Release note: None
```
```
    *: rename pkg/kvserver/storagepb to pkg/kv/kvserver/kvserverpb

    Simple goland rename and `make generate`. Fall out from earlier
    pkg/storage to pkg/kv{...} rename.

    Release note: None 
```

Co-authored-by: irfan sharif <[email protected]>
  • Loading branch information
craig[bot] and irfansharif committed May 20, 2020
2 parents 40823c4 + 47a3b68 commit 09125b5
Show file tree
Hide file tree
Showing 155 changed files with 2,136 additions and 2,135 deletions.
6 changes: 3 additions & 3 deletions pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptpb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/security"
"github.com/cockroachdb/cockroach/pkg/server"
Expand Down Expand Up @@ -2166,7 +2166,7 @@ func TestChangefeedProtectedTimestamps(t *testing.T) {
}
}
}
requestFilter = storagebase.ReplicaRequestFilter(func(
requestFilter = kvserverbase.ReplicaRequestFilter(func(
ctx context.Context, ba roachpb.BatchRequest,
) *roachpb.Error {
if ba.Txn == nil || ba.Txn.Name != "changefeed backfill" {
Expand Down Expand Up @@ -2395,7 +2395,7 @@ func TestChangefeedProtectedTimestampsVerificationFails(t *testing.T) {
jobs.DefaultAdoptInterval = 10 * time.Millisecond

verifyRequestCh := make(chan *roachpb.AdminVerifyProtectedTimestampRequest, 1)
requestFilter := storagebase.ReplicaRequestFilter(func(
requestFilter := kvserverbase.ReplicaRequestFilter(func(
ctx context.Context, ba roachpb.BatchRequest,
) *roachpb.Error {
if r, ok := ba.GetArg(roachpb.AdminVerifyProtectedTimestamp); ok {
Expand Down
14 changes: 7 additions & 7 deletions pkg/ccl/importccl/import_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/cockroachdb/cockroach/pkg/ccl/storageccl"
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/sql/execinfra"
"github.com/cockroachdb/cockroach/pkg/sql/execinfrapb"
Expand Down Expand Up @@ -187,7 +187,7 @@ func ingestKvs(
// Otherwise, as a consequence of filling up faster the pkIndexAdder buffer
// will hog memory as it tries to grow more aggressively.
minBufferSize, maxBufferSize, stepSize := storageccl.ImportBufferConfigSizes(flowCtx.Cfg.Settings, true /* isPKAdder */)
pkIndexAdder, err := flowCtx.Cfg.BulkAdder(ctx, flowCtx.Cfg.DB, writeTS, storagebase.BulkAdderOptions{
pkIndexAdder, err := flowCtx.Cfg.BulkAdder(ctx, flowCtx.Cfg.DB, writeTS, kvserverbase.BulkAdderOptions{
Name: "pkAdder",
DisallowShadowing: true,
SkipDuplicates: true,
Expand All @@ -202,7 +202,7 @@ func ingestKvs(
defer pkIndexAdder.Close(ctx)

minBufferSize, maxBufferSize, stepSize = storageccl.ImportBufferConfigSizes(flowCtx.Cfg.Settings, false /* isPKAdder */)
indexAdder, err := flowCtx.Cfg.BulkAdder(ctx, flowCtx.Cfg.DB, writeTS, storagebase.BulkAdderOptions{
indexAdder, err := flowCtx.Cfg.BulkAdder(ctx, flowCtx.Cfg.DB, writeTS, kvserverbase.BulkAdderOptions{
Name: "indexAdder",
DisallowShadowing: true,
SkipDuplicates: true,
Expand Down Expand Up @@ -332,14 +332,14 @@ func ingestKvs(
// more efficient than parsing every kv.
if indexID == 1 {
if err := pkIndexAdder.Add(ctx, kv.Key, kv.Value.RawBytes); err != nil {
if errors.HasType(err, (*storagebase.DuplicateKeyError)(nil)) {
if errors.HasType(err, (*kvserverbase.DuplicateKeyError)(nil)) {
return errors.Wrap(err, "duplicate key in primary index")
}
return err
}
} else {
if err := indexAdder.Add(ctx, kv.Key, kv.Value.RawBytes); err != nil {
if errors.HasType(err, (*storagebase.DuplicateKeyError)(nil)) {
if errors.HasType(err, (*kvserverbase.DuplicateKeyError)(nil)) {
return errors.Wrap(err, "duplicate key in index")
}
return err
Expand All @@ -363,14 +363,14 @@ func ingestKvs(
}

if err := pkIndexAdder.Flush(ctx); err != nil {
if errors.HasType(err, (*storagebase.DuplicateKeyError)(nil)) {
if errors.HasType(err, (*kvserverbase.DuplicateKeyError)(nil)) {
return nil, errors.Wrap(err, "duplicate key in primary index")
}
return nil, err
}

if err := indexAdder.Flush(ctx); err != nil {
if errors.HasType(err, (*storagebase.DuplicateKeyError)(nil)) {
if errors.HasType(err, (*kvserverbase.DuplicateKeyError)(nil)) {
return nil, errors.Wrap(err, "duplicate key in index")
}
return nil, err
Expand Down
8 changes: 4 additions & 4 deletions pkg/ccl/importccl/import_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/jobs"
"github.com/cockroachdb/cockroach/pkg/jobs/jobspb"
"github.com/cockroachdb/cockroach/pkg/kv"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql/distsql"
Expand Down Expand Up @@ -194,7 +194,7 @@ type doNothingKeyAdder struct {
onFlush func()
}

var _ storagebase.BulkAdder = &doNothingKeyAdder{}
var _ kvserverbase.BulkAdder = &doNothingKeyAdder{}

func (a *doNothingKeyAdder) Add(_ context.Context, k roachpb.Key, _ []byte) error {
if a.onKeyAdd != nil {
Expand Down Expand Up @@ -228,7 +228,7 @@ func TestImportIgnoresProcessedFiles(t *testing.T) {
ExternalStorage: externalStorageFactory,
BulkAdder: func(
_ context.Context, _ *kv.DB, _ hlc.Timestamp,
_ storagebase.BulkAdderOptions) (storagebase.BulkAdder, error) {
_ kvserverbase.BulkAdderOptions) (kvserverbase.BulkAdder, error) {
return &doNothingKeyAdder{}, nil
},
},
Expand Down Expand Up @@ -326,7 +326,7 @@ func TestImportHonorsResumePosition(t *testing.T) {
ExternalStorage: externalStorageFactory,
BulkAdder: func(
_ context.Context, _ *kv.DB, _ hlc.Timestamp,
opts storagebase.BulkAdderOptions) (storagebase.BulkAdder, error) {
opts kvserverbase.BulkAdderOptions) (kvserverbase.BulkAdder, error) {
if opts.Name == "pkAdder" {
return pkBulkAdder, nil
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/ccl/storageccl/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql/sqlbase"
Expand Down Expand Up @@ -197,8 +197,8 @@ func runTestImport(t *testing.T, init func(*cluster.Settings)) {
const initialAmbiguousSubReqs = 3
remainingAmbiguousSubReqs := int64(initialAmbiguousSubReqs)
knobs := base.TestingKnobs{Store: &kvserver.StoreTestingKnobs{
EvalKnobs: storagebase.BatchEvalTestingKnobs{
TestingEvalFilter: func(filterArgs storagebase.FilterArgs) *roachpb.Error {
EvalKnobs: kvserverbase.BatchEvalTestingKnobs{
TestingEvalFilter: func(filterArgs kvserverbase.FilterArgs) *roachpb.Error {
switch filterArgs.Req.(type) {
case *roachpb.WriteBatchRequest, *roachpb.AddSSTableRequest:
// No-op.
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/gc"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/rditer"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/stateloader"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
Expand Down Expand Up @@ -806,7 +806,7 @@ func parseGossipValues(gossipInfo *gossip.InfoStatus) (string, error) {
}
output = append(output, fmt.Sprintf("%q: %+v", key, desc))
} else if strings.HasPrefix(key, gossip.KeyNodeLivenessPrefix) {
var liveness storagepb.Liveness
var liveness kvserverpb.Liveness
if err := protoutil.Unmarshal(bytes, &liveness); err != nil {
return "", errors.Wrapf(err, "failed to parse value for key %q", key)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/haproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/cli/cliflags"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/server/status/statuspb"
Expand Down Expand Up @@ -96,11 +96,11 @@ func nodeStatusesToNodeInfos(nodes *serverpb.NodesResponse) []haProxyNodeInfo {
status := statusByID[nodeID]
liveness := nodes.LivenessByNodeID[nodeID]
switch liveness {
case storagepb.NodeLivenessStatus_DECOMMISSIONING:
case kvserverpb.NodeLivenessStatus_DECOMMISSIONING:
fmt.Fprintf(stderr, "warning: node %d status is %s, excluding from haproxy configuration\n",
nodeID, liveness)
fallthrough
case storagepb.NodeLivenessStatus_DECOMMISSIONED:
case kvserverpb.NodeLivenessStatus_DECOMMISSIONED:
continue
}

Expand Down
16 changes: 8 additions & 8 deletions pkg/cli/haproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"

"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/server/status/statuspb"
Expand Down Expand Up @@ -123,13 +123,13 @@ func TestNodeStatusToNodeInfoConversion(t *testing.T) {
{Desc: roachpb.NodeDescriptor{NodeID: 5}},
{Desc: roachpb.NodeDescriptor{NodeID: 6}},
},
LivenessByNodeID: map[roachpb.NodeID]storagepb.NodeLivenessStatus{
1: storagepb.NodeLivenessStatus_DEAD,
2: storagepb.NodeLivenessStatus_DECOMMISSIONING,
3: storagepb.NodeLivenessStatus_UNKNOWN,
4: storagepb.NodeLivenessStatus_UNAVAILABLE,
5: storagepb.NodeLivenessStatus_LIVE,
6: storagepb.NodeLivenessStatus_DECOMMISSIONED,
LivenessByNodeID: map[roachpb.NodeID]kvserverpb.NodeLivenessStatus{
1: kvserverpb.NodeLivenessStatus_DEAD,
2: kvserverpb.NodeLivenessStatus_DECOMMISSIONING,
3: kvserverpb.NodeLivenessStatus_UNKNOWN,
4: kvserverpb.NodeLivenessStatus_UNAVAILABLE,
5: kvserverpb.NodeLivenessStatus_LIVE,
6: kvserverpb.NodeLivenessStatus_DECOMMISSIONED,
},
},
[]haProxyNodeInfo{
Expand Down
12 changes: 6 additions & 6 deletions pkg/cli/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strconv"
"time"

"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/util/retry"
Expand Down Expand Up @@ -340,8 +340,8 @@ func expectNodesDecommissioned(
// The user is expecting the node to not be
// decommissioned/decommissioning already.
switch liveness {
case storagepb.NodeLivenessStatus_DECOMMISSIONING,
storagepb.NodeLivenessStatus_DECOMMISSIONED:
case kvserverpb.NodeLivenessStatus_DECOMMISSIONING,
kvserverpb.NodeLivenessStatus_DECOMMISSIONED:
fmt.Fprintln(stderr, "warning: node", nodeID, "is already decommissioning or decommissioned")
default:
// It's always possible to decommission a node that's either live
Expand All @@ -350,10 +350,10 @@ func expectNodesDecommissioned(
} else {
// The user is expecting the node to be recommissionable.
switch liveness {
case storagepb.NodeLivenessStatus_DECOMMISSIONING,
storagepb.NodeLivenessStatus_DECOMMISSIONED:
case kvserverpb.NodeLivenessStatus_DECOMMISSIONING,
kvserverpb.NodeLivenessStatus_DECOMMISSIONED:
// ok.
case storagepb.NodeLivenessStatus_LIVE:
case kvserverpb.NodeLivenessStatus_LIVE:
fmt.Fprintln(stderr, "warning: node", nodeID, "is not decommissioned")
default: // dead, unavailable, etc
fmt.Fprintln(stderr, "warning: node", nodeID, "is in unexpected state", liveness)
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"
"unicode"

"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/server/status/statuspb"
Expand Down Expand Up @@ -373,7 +373,7 @@ func runDebugZip(cmd *cobra.Command, args []string) (retErr error) {
if cErr := z.createJSONOrError(base+"/liveness.json", nodes, err); cErr != nil {
return cErr
}
livenessByNodeID := map[roachpb.NodeID]storagepb.NodeLivenessStatus{}
livenessByNodeID := map[roachpb.NodeID]kvserverpb.NodeLivenessStatus{}
if lresponse != nil {
livenessByNodeID = lresponse.Statuses
}
Expand All @@ -382,7 +382,7 @@ func runDebugZip(cmd *cobra.Command, args []string) (retErr error) {
nodeID := node.Desc.NodeID

liveness := livenessByNodeID[nodeID]
if liveness == storagepb.NodeLivenessStatus_DECOMMISSIONED {
if liveness == kvserverpb.NodeLivenessStatus_DECOMMISSIONED {
// Decommissioned + process terminated. Let's not waste time
// on this node.
//
Expand Down
12 changes: 6 additions & 6 deletions pkg/jobs/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package jobs

import (
"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/syncutil"
Expand All @@ -30,7 +30,7 @@ var FakeNodeID = func() *base.NodeIDContainer {
type FakeNodeLiveness struct {
mu struct {
syncutil.Mutex
livenessMap map[roachpb.NodeID]*storagepb.Liveness
livenessMap map[roachpb.NodeID]*kvserverpb.Liveness
}

// A non-blocking send is performed over these channels when the corresponding
Expand All @@ -45,10 +45,10 @@ func NewFakeNodeLiveness(nodeCount int) *FakeNodeLiveness {
SelfCalledCh: make(chan struct{}),
GetLivenessesCalledCh: make(chan struct{}),
}
nl.mu.livenessMap = make(map[roachpb.NodeID]*storagepb.Liveness)
nl.mu.livenessMap = make(map[roachpb.NodeID]*kvserverpb.Liveness)
for i := 0; i < nodeCount; i++ {
nodeID := roachpb.NodeID(i + 1)
nl.mu.livenessMap[nodeID] = &storagepb.Liveness{
nl.mu.livenessMap[nodeID] = &kvserverpb.Liveness{
Epoch: 1,
Expiration: hlc.LegacyTimestamp(hlc.MaxTimestamp),
NodeID: nodeID,
Expand All @@ -63,7 +63,7 @@ func (*FakeNodeLiveness) ModuleTestingKnobs() {}
// Self implements the implicit storage.NodeLiveness interface. It uses NodeID
// as the node ID. On every call, a nonblocking send is performed over nl.ch to
// allow tests to execute a callback.
func (nl *FakeNodeLiveness) Self() (storagepb.Liveness, error) {
func (nl *FakeNodeLiveness) Self() (kvserverpb.Liveness, error) {
select {
case nl.SelfCalledCh <- struct{}{}:
default:
Expand All @@ -74,7 +74,7 @@ func (nl *FakeNodeLiveness) Self() (storagepb.Liveness, error) {
}

// GetLivenesses implements the implicit storage.NodeLiveness interface.
func (nl *FakeNodeLiveness) GetLivenesses() (out []storagepb.Liveness) {
func (nl *FakeNodeLiveness) GetLivenesses() (out []kvserverpb.Liveness) {
select {
case nl.GetLivenessesCalledCh <- struct{}{}:
default:
Expand Down
6 changes: 3 additions & 3 deletions pkg/jobs/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/jobs/jobspb"
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagepb"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/security"
"github.com/cockroachdb/cockroach/pkg/settings"
Expand Down Expand Up @@ -68,8 +68,8 @@ var (
// NodeLiveness is the subset of storage.NodeLiveness's interface needed
// by Registry.
type NodeLiveness interface {
Self() (storagepb.Liveness, error)
GetLivenesses() []storagepb.Liveness
Self() (kvserverpb.Liveness, error)
GetLivenesses() []kvserverpb.Liveness
}

// Registry creates Jobs and manages their leases and cancelation.
Expand Down
8 changes: 4 additions & 4 deletions pkg/kv/bulk/buffering_adder.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"time"

"github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/storage"
Expand Down Expand Up @@ -63,9 +63,9 @@ type BufferingAdder struct {
onFlush func()
}

var _ storagebase.BulkAdder = &BufferingAdder{}
var _ kvserverbase.BulkAdder = &BufferingAdder{}

// MakeBulkAdder makes a storagebase.BulkAdder that buffers and sorts K/Vs
// MakeBulkAdder makes a kvserverbase.BulkAdder that buffers and sorts K/Vs
// passed to add into SSTs that are then ingested. rangeCache if set is
// consulted to avoid generating an SST that will span a range boundary and thus
// encounter an error and need to be split and retired to be applied.
Expand All @@ -75,7 +75,7 @@ func MakeBulkAdder(
rangeCache *kvcoord.RangeDescriptorCache,
settings *cluster.Settings,
timestamp hlc.Timestamp,
opts storagebase.BulkAdderOptions,
opts kvserverbase.BulkAdderOptions,
bulkMon *mon.BytesMonitor,
) (*BufferingAdder, error) {
if opts.MinBufferSize == 0 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/bulk/sst_batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/clusterversion"
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/storagebase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/settings"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
Expand Down Expand Up @@ -139,7 +139,7 @@ func (b *SSTBatcher) AddMVCCKey(ctx context.Context, key storage.MVCCKey, value
return nil
}

err := &storagebase.DuplicateKeyError{}
err := &kvserverbase.DuplicateKeyError{}
err.Key = append(err.Key, key.Key...)
err.Value = append(err.Value, value...)
return err
Expand Down
Loading

0 comments on commit 09125b5

Please sign in to comment.